fix win/lose handling