fixed bug with drawing grids multiple times with cubes