fix tile coloring bug in grid.js