Filter out empty grids.