Fix bugs in the scripted dialog box.