     func reloadtabledata() {
         if let index = self.index {
             let hiddenID = self.configurations?.gethiddenID(index: index) ?? -1
-            if hiddenID > -1 {
-                let config = self.configurations?.getConfigurations()[index]
-                self.scheduleloggdata = ScheduleLoggData(hiddenID: hiddenID, sortascending: self.sortedascending)
-                if self.connected(config: config!) {
-                    if config?.task == "snapshot" { self.working.startAnimation(nil) }
-                    self.snapshotsloggdata = SnapshotsLoggData(config: config!, insnapshot: false)
-                }
-            } else {
-                self.scheduleloggdata = ScheduleLoggData(sortascending: self.sortedascending)
+            guard hiddenID > -1 else { return }
+            let config = self.configurations?.getConfigurations()[index]
+            self.scheduleloggdata = ScheduleLoggData(hiddenID: hiddenID, sortascending: self.sortedascending)
+            if self.connected(config: config!) {
+                if config?.task == "snapshot" { self.working.startAnimation(nil) }
+                self.snapshotsloggdata = SnapshotsLoggData(config: config!, insnapshot: false)
             }
         } else {
             self.scheduleloggdata = ScheduleLoggData(sortascending: self.sortedascending)

        let dialog: String = NSLocalizedString("Delete", comment: "Logg")
        let answer = Alerts.dialogOrCancel(question: question + " " + self.selectednumber() + " logrecords?", text: text, dialog: dialog)
        if answer {
            self.deselectRow()
            self.schedules?.deleteselectedrows(scheduleloggdata: self.scheduleloggdata)
        }
    }

        self.selectbutton.state = .off
    }

    private func deselectrow() {
        guard self.index != nil else { return }
        self.scheduletable.deselectRow(self.index!)
        self.index = self.index()
    }
}

