Prolog fixes