fix duplicated dialogs