set the grid height correctly