Fixed glitch where dialogs are not hidden during the page load before scripts run.