fixed errors in initialGrid