fixing bug in compiler which yields errors with prolog tests