fix prolog result