win detection bug