fixed a dialog box bug