Fixed bug on reading input format of gringo.