fix the modal dialog issue