prolog2java bug fix