 		caller.retrieveUnreadEntries() { result in
 			switch result {
 			case .success(let articleIDs):
-				self.syncArticleReadState(account: account, articleIDs: articleIDs)
-				group.leave()
+				self.syncArticleReadState(account: account, articleIDs: articleIDs) {
+					group.leave()
+				}
 			case .failure(let error):
 				errorOccurred = true
 				os_log(.info, log: self.log, "Retrieving unread entries failed: %@.", error.localizedDescription)

			func process(_ pendingArticleIDs: Set<String>) {
				
				let feedbinStarredArticleIDs = Set(articleIDs.map { String($0) } )
				let updatableFeedbinUnreadArticleIDs = feedbinStarredArticleIDs.subtracting(pendingArticleIDs)

				account.fetchStarredArticleIDs { articleIDsResult in
					guard let currentStarredArticleIDs = try? articleIDsResult.get() else {
						return
					}

					// Mark articles as starred
					let deltaStarredArticleIDs = updatableFeedbinUnreadArticleIDs.subtracting(currentStarredArticleIDs)
					account.markAsStarred(deltaStarredArticleIDs)

					// Mark articles as unstarred
					let deltaUnstarredArticleIDs = currentStarredArticleIDs.subtracting(updatableFeedbinUnreadArticleIDs)
					account.markAsUnstarred(deltaUnstarredArticleIDs)
				}
								
			}

		
	}
	
	func syncArticleStarredState(account: Account, articleIDs: [Int]?, completion: @escaping (() -> Void)) {
		guard let articleIDs = articleIDs else {
			completion()
			return
		}

