Added safeguards to make sure there exists a game state at all times.