Fixed issue with modal dialogs