Whenever a dialog is hidden, remove it.