fixed some of the end of game nil errors