fix bug: dialog.dismiss