Close dialogs when moving or reloading