better positioning of dialog on the screen