fixed minor bug in win condition