fix jni NULL pointer