fixing auto-close from itself