fix ctypes between 0x0100 and 0xFFFF not saving correctly