Fix bugs, thanks to jnthn++, nwc10++