fixing layout change for grid class