fixed the win condition