fixed bugs

fixed bugs in the dialog