fix prolog stuff