Fixes to java helpers