made jni instances volatile