fixed jni stuff