Fixed bug when increasing grid size