Fix failure to alert unsaved changes.