fix for grids with no rows