fixed checks for Java bindings