fix the problem with maximized dialogs