Added check for bad game state.