better centering of popup dialogs