Hide modals when destroyed