Fix window openning despite of how if it is closed