More Java bindings fixes