Fix issues with FFI.