         
         self.updateCache { [weak self] in
             // restore theme of opened documents to default
-            let defaultThemeName = UserDefaults.standard[.theme]!
-            
-            self?.notifySettingUpdate(oldName: name, newName: defaultThemeName)
+            self?.notifySettingUpdate(oldName: name, newName: UserDefaults.standard[.theme]!)
         }
     }
     

    /// load theme names in user domain
    override func loadUserSettings() {
        
        var themeNameSet = OrderedSet(self.bundledThemeNames)
        
        // load user themes if exists
        let userThemeNames = self.userSettingFileURLs.map { self.settingName(from: $0) }
        themeNameSet.append(contentsOf: userThemeNames)
        
        self.themeNames = themeNameSet.array
        
        // reset user default if not found
        let defaultThemeName = UserDefaults.standard[.theme]!
        if !themeNameSet.contains(defaultThemeName) {
            UserDefaults.standard.removeObject(forKey: DefaultKeys.theme.rawValue)
        }
    }
    

        super.init()
        
        // cache bundled theme names
        self.bundledThemeNames = Bundle.main.urls(forResourcesWithExtension: self.filePathExtension, subdirectory: self.directoryName)!
            .filter { !$0.lastPathComponent.hasPrefix("_") }
            .map { self.settingName(from: $0) }
            .sorted { $0.localizedCaseInsensitiveCompare($1) == .orderedAscending }
