     }
 
     @IBAction func connect(_ sender: NSButton) {
-        guard self.rsyncindex != nil else { return }
+        guard self.rsyncindex != nil && self.rcloneindex != nil else { return }
+        guard  self.configurations!.getConfigurations()[self.rsyncindex!].task != ViewControllerReference.shared.combined else { return}
         if let rclonehiddenID = self.configurationsrclone?.gethiddenID(index: self.rcloneindex!) {
             self.configurations!.setrcloneconnection(index: self.rsyncindex!, rclonehiddenID: rclonehiddenID, rcloneprofile: rcloneprofilename)
-            self.updateview()
-        }
+        }
+         self.updateview()
     }
 
     @IBAction func reset(_ sender: NSButton) {
         guard self.rsyncindex != nil else { return }
         self.configurations!.deletercloneconnection(index: self.rsyncindex!)
         self.updateview()
-        self.connectbutton.isEnabled = self.enableconnectionbutton()
-        self.resetbutton.isEnabled = self.enableresetbutton()
     }
 
     @IBAction func selectprofile(_ sender: NSComboBox) {

            } else {
                self.rcloneindex = nil
            }
            if self.rcloneindex != nil {
                self.connectbutton.isEnabled = self.enableconnectionbutton()
                self.resetbutton.isEnabled = self.enableresetbutton()
            } else {
                self.connectbutton.isEnabled = false
                self.resetbutton.isEnabled = false
            }
            globalMainQueue.async(execute: { () -> Void in
                self.rcloneTableView.reloadData()
            })

            guard rcloneindex >= 0 else { return }
            self.rcloneID.stringValue = self.configurationsrclone!.getConfigurations()[rcloneindex].backupID
            self.rcloneremotecatalog.stringValue = self.configurationsrclone!.getConfigurations()[rcloneindex].offsiteCatalog
        }
    }

