                     // save images to local
 
                     request.avatar.saveOriginalImage(image, styledImage: styledImage)
-                }
-            })
+                })
+            }
 
             self.requestPool.removeRequestsWithURL(URL)
         }


import UIKit

func ==(lhs: AvatarPod.Request, rhs: AvatarPod.Request) -> Bool {
    return lhs.key == rhs.key
}

public class AvatarPod {

    static let sharedInstance = AvatarPod()

    private init() {
    }

    let cache = NSCache()


    public class func wakeAvatar(avatar: Avatar, completion: Completion) {

        guard let URL = avatar.URL else {
            completion(finished: false, image: avatar.placeholderImage ?? UIImage(), cacheType: .Memory)
            return
        }

