make sure that the modal HelpDialog displaying an error message completes before the rest of the shutdown process is called, otherwise we get two modal dialogs at once