Add win state detection