Fixed 32 bit pointer bug in JNI code