Fixed DialogBox objects not closing.