fix JNIProxy bugs