 			return
 		}
 		
-		//Prepend pending transfer to new ones
-		let changedObjects = preferences.transferLocal.map { $0.getObject() }.filter { $0 != nil }.map { $0! } + data
-		let deletedIDs = preferences.deleteLocal + delete
-		
-		guard changedObjects.count != 0 || deletedIDs.count != 0 else {
-			return
-		}
-		
-		guard canComunicate else {
-			preferences.transferLocal = changedObjects.map { $0.recordID }
-			preferences.deleteLocal = deletedIDs
-			
-			return
-		}
-		
-		let changedData = changedObjects.map { (cdObj) -> WCObject? in
-			let wcObj = cdObj.wcObject
+		DispatchQueue.main.async {
+			//Prepend pending transfer to new ones
+			let changedObjects = preferences.transferLocal.map { $0.getObject() }.filter { $0 != nil }.map { $0! } + data
+			let deletedIDs = preferences.deleteLocal + delete
+			
+			guard changedObjects.count != 0 || deletedIDs.count != 0 else {
+				return
+			}
+			
+			guard self.canComunicate else {
+				preferences.transferLocal = changedObjects.map { $0.recordID }
+				preferences.deleteLocal = deletedIDs
+				
+				return
+			}
+			
+			
+			let changedData = changedObjects.map { (cdObj) -> WCObject? in
+				let wcObj = cdObj.wcObject
+				if markAsInitial {
+					wcObj?.setAsInitialData()
+				}
+				
+				return wcObj
+			}.filter { $0 != nil }.map { $0!.wcRepresentation }
+			let deletedData = deletedIDs.map { $0.wcRepresentation }
+			
+			var data = [ self.changesKey: changedData, self.deletionKey: deletedData ] as [String : Any]
 			if markAsInitial {
-				wcObj?.setAsInitialData()
-			}
-			
-			return wcObj
-		}.filter { $0 != nil }.map { $0!.wcRepresentation }
-		let deletedData = deletedIDs.map { $0.wcRepresentation }
-		
-		var data = [ changesKey: changedData, deletionKey: deletedData ] as [String : Any]
-		if markAsInitial {
-			data[isInitialDataKey] = true
-		}
-		
-		sess.transferUserInfo(data)
-		preferences.transferLocal = []
-		preferences.deleteLocal = []
+				data[self.isInitialDataKey] = true
+			}
+			
+			sess.transferUserInfo(data)
+			preferences.transferLocal = []
+			preferences.deleteLocal = []
+		}
 	}
 	
 	fileprivate func setRunningWorkout() {

			return
		}
		
		preferences.transferLocal = []
		preferences.deleteLocal = []
		
		preferences.saveRemote = []
		preferences.deleteRemote = []
		
		let data = Workout.getList().flatMap { [$0 as DataObject]
			+ $0.exercizes.map { [$0 as DataObject] + Array($0.sets) as [DataObject] }.reduce([]) { $0 + $1 } }
		wcInterface.sendUpdateForChangedObjects(data, andDeleted: [], markAsInitial: true)
		
		preferences.initialSyncDone = true
		print("Initial data sent to watch")
	}

	fileprivate func saveCounterPartUpdatesForChangedObjects(_ changes: [WCObject], andDeleted deletion: [CDRecordID]) -> Bool {


	fileprivate func session(_ session: WCSession, didReceiveUserInfo userInfo: [String : Any] = [:]) {
		if userInfo[isInitialDataKey] as? Bool ?? false, iswatchOS {
			DispatchQueue.main.async {
				_ = dataManager.clearDatabase()
			}
		}
		
		if let curWorkout = userInfo[currentWorkoutKey] as? [Any], curWorkout.count == 2 {
