Fixed a problem with the grid height calculation

Closes #30

Signed-off-by: Stephen Elford <steve@trafficwebsites.co.uk>