added dialog and contextmenu changes