Fixed painting to the grid.