Fixed bug for printing of grids