Fixing the rendering of the grid lines