Removing close window when not needed