fixed bug of dialogs