bug in grid.js