copied changes done for dialogBoxes for confirmDialogBoxes