removed ugly hack for dialog in a scrolled page. And some beautification