bug fix in gridSize