Fixed a JNI bug that was causing windows release build to crash