Fixed incorrect JNI code in object removal wrapper