fix serious problem with detect win