Fixed WARNING: JNI call made with exception pending