Fix bug with returning error from non-ffi bindings.