Fix grid coordinates.