Fixed bug in dialog box callback at failure #issue 7.