Fixed bug on gringo input.