Fix for duplicate dialogs