JNI bugg fix