Fix function object for varialbe input FFI function