Fixed disposing of modal dialog box