Fixing ctypes issue hackily