fix function arguments for JNI