a few changes to get modal dialogs working