fix win logic