Fix Prolog generation.