Disable autocommands while closing