ctypes fix