solve centering of dialog boxes problem