Remove previous control over minimize and close window