only close window if multiple exist