fixed up the dialog using modal