fix duplicate dialog box