             self.info.stringValue = Infosnapshots().info(num: 0)
             return
         }
-        guard self.snapshotsloggdata!.remotecatalogstodelete!.count > 0 else {
+        guard (self.snapshotsloggdata?.remotecatalogstodelete?.count ?? -1) > 0 else {
             self.deletebutton.isEnabled = true
             self.deletesnapshots.isEnabled = true
             self.info.stringValue = Infosnapshots().info(num: 0)

        if myTableViewFromNotification == self.snapshotstableView {
            let indexes = myTableViewFromNotification.selectedRowIndexes
            if let index = indexes.first {
                let dict = self.snapshotsloggdata!.snapshotslogs![index]
                self.hiddenID = dict.value(forKey: "hiddenID") as? Int
                guard self.hiddenID != nil else { return }
                self.index = self.configurations?.getIndex(hiddenID!)
            } else {
                self.index = nil
            }
        } else {
            let indexes = myTableViewFromNotification.selectedRowIndexes
            if let index = indexes.first {
                let config = self.configurations!.getConfigurations()[index]
                guard self.connected(config: config) == true else {
                    self.info.stringValue = Infosnapshots().info(num: 6)
                    return
                }
                self.selectplan.isEnabled = false
                self.selectdayofweek.isEnabled = false
                self.info.stringValue = Infosnapshots().info(num: 0)
                let hiddenID = self.configurations!.getConfigurationsDataSourceSynchronize()![index].value(forKey: "hiddenID") as? Int ?? -1
                self.index = self.configurations?.getIndex(hiddenID)
                self.getSourceindex(index: hiddenID)
            } else {
                self.selectplan.isEnabled = false
                self.selectdayofweek.isEnabled = false

        if self.snapshotsloggdata!.remotecatalogstodelete!.count == 0 {
            self.snapshotsloggdata!.remotecatalogstodelete = nil
        }
        if let config = self.config {
            arguments = SnapshotDeleteCatalogsArguments(config: config, remotecatalog: remotecatalog)
            deletecommand = SnapshotCommandDeleteCatalogs(command: arguments?.getCommand(), arguments: arguments?.getArguments())
            deletecommand?.setdelegate(object: self)
            deletecommand?.executeProcess(outputprocess: nil)
        }
    }

    // setting which table row is selected
