Fixed multi dialogs bug