Fixed the assert in GridManager