Fixed gridWithBall null bug