bad index
Fixed some glaring bugs in the JNI bindings