Fix the grid layout helper.