fixed a null pointer exception in EndGame.cs