fix gird bug