fix win condition bug