some fixes to dialog