fixing java-side bug which matched refimpl bug (fixed in previous commit)