fixed the grid and pagination