Multi Windows fix

Fixe of previous windows not closing