ENH: Ensure window not destroyed