Fixing compile errors for the grid class