fixed end game condition.