Add support for modal dialogs