     }
 
     @IBAction func copyconfiguration(_ sender: NSButton) {
-        guard self.index != nil else { return }
-        let hiddenID = self.configurations!.gethiddenID(index: self.index!)
+        guard self.index() != nil else { return }
+        let hiddenID = self.configurations!.gethiddenID(index: self.index() ?? -1)
         guard hiddenID > -1 else { return }
         self.localCatalog.stringValue = self.configurations!.getResourceConfiguration(hiddenID, resource: .localCatalog)
         self.offsiteCatalog.stringValue = self.configurations!.getResourceConfiguration(hiddenID, resource: .remoteCatalog)

        super.viewDidAppear()
        self.backuptypeselected = .synchronize
        self.backuptype.selectItem(at: 0)
        self.index = self.index()
        if self.index != nil {
            self.copyconfigbutton.isEnabled = true
        } else {
            self.copyconfigbutton.isEnabled = false

        } else if self.backuptypeselected == .singlefile {
            dict.setValue(1, forKey: "singleFile")
        }
        if !self.localCatalog.stringValue.hasSuffix("/") && self.backuptypeselected != .singlefile {
            self.localCatalog.stringValue += "/"
            dict.setValue(self.localCatalog.stringValue, forKey: "localCatalog")
