update: Guard the removal of the window less obscurely