fixed dialog box bug