Make sure gridsize is a whole number