fixed bug with grid layout