Make sure modals are torn down even if you close them by hitting esc.