Made end of game crash less by handling bad input