Fix broken java and python bindings