corrects win/lose functionality