fix ffi definitions