fixed grid.c inclusion bug