Bug fix in grid