fixed type in grid.py