fix for resizing problems of maindialog