setup for running the dialog
fixed minor errors