fixing a dialog bug