adjust grid height properly