Improved win/lose logic