 
     func notifyDebugMessageToDelegates(_ message: String) {
         let _message = "Rank: " + message
-        delegates.forEach { $0.value.delegate?.rankingManager(self, hasDebugMessage: _message) }
+        delegates.forEach { $0.1.delegate?.rankingManager(self, hasDebugMessage: _message) }
     }
 
     func logDebug(rank: Int?, liveId: String, delegate: RankingManagerDelegate?) {

    func removeDelegate(_ delegate: RankingManagerDelegate) {
        objc_sync_enter(self)
        defer { objc_sync_exit(self) }
        delegates = delegates.filter { $0.value.delegate !== delegate }
        logDelegates()
        invalidateQueryTimerIfNeeded()
    }

    func addDelegate(_ delegate: RankingManagerDelegate, for liveId: String) {
        objc_sync_enter(self)
        defer { objc_sync_exit(self) }
        // De-register the delegate before registering, just in case.
        delegates = delegates.filter { $0.1.delegate !== delegate }
        delegates.append((liveId, WeakDelegateReference(delegate: delegate)))
        logDelegates()
        scheduleQueryTimerIfNeeded()
        // Just in case, notify rank immediately with latest rank map.
