fixes to java bindings