Fix Python 3 ctype argument error

ctypes.ArgumentError: argument 3: <class 'TypeError'>: wrong type