Correcting bug on the grid feature