fixed bug of grid