         } else {
             cell.accessoryType = .None
         }
-        print("Selected Peers : \(self.optionsObj.selectedPeers)")
-
+        if (self.optionsObj.selectedPeers.count != ConnectionManager.allWorkers.count) {
+            self.optionsObj.selectedPeers.removeAll()
+            for (var i=0; i < ConnectionManager.allWorkers.count; i++) {
+                let strPeerName: String = ConnectionManager.allWorkers[i].displayName
+                self.optionsObj.selectedPeers.append(strPeerName)
+            }
+        }
+        //print("Selected Peers : \(self.optionsObj.selectedPeers)")
         return cell
     }
     

    func findPeers(refreshControl: UIRefreshControl) {
        PeerKit.transceive(Fog.SERVICE_TYPE)
        refreshControl.endRefreshing()
        print("Selected Peers (findPeers): \(self.optionsObj.selectedPeers)")
    }

    
    func tableView(tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
        return ConnectionManager.allWorkers.count
    }
    

                self.optionsObj.selectedPeers.removeAtIndex(index)
            }
        }

        //print("Selected Peers->tableView : \(self.optionsObj.selectedPeers)")
        tableView.reloadRowsAtIndexPaths([indexPath], withRowAnimation: .Automatic)
    }
    
