Minor fixes for ctypes bindings