 
     override func prepareForReuse() {
         super.prepareForReuse()
-
-        if let imageViews = self.imageViews {
-            for imageView in imageViews {
-                imageView.image = nil
-                imageView.animatedImage = nil
-                imageView.removeFromSuperview()
-            }
-        }
-
-        self.imageViews = nil
+        self.clearImages()
     }
 
     func updateImages() {
         if let images = self.images {
             if let contentWidth = self.contentWidth {
-                if let imageViews = self.imageViews {
-                    for imageView in imageViews {
-                        imageView.image = nil
-                        imageView.animatedImage = nil
-                        imageView.removeFromSuperview()
-                    }
-                }
+                self.clearImages()
 
                 let imageManager = SDWebImageManager.sharedManager()
                 let imageDownloader = SDWebImageDownloader.sharedDownloader()
                 let widthRatio: Float = 1.0 / Float(images.count)
                 var imageViews = Array<FLAnimatedImageView>()
+                var downloadOperations = Array<SDWebImageOperation>()
                 var lastImageView: UIImageView?
                 for image in images {
                     let imageView = FLAnimatedImageView()

                        if let data = TMCache.sharedCache().objectForKey(imageURL.absoluteString) as? NSData {
                            imageView.animatedImage = FLAnimatedImage(animatedGIFData: data)
                        } else {
                            imageDownloader.downloadImageWithURL(imageURL, options: SDWebImageDownloaderOptions.UseNSURLCache, progress: nil, completed: { (image, data, error, finished) -> Void in
                                if finished && error == nil {
                                    imageView.animatedImage = FLAnimatedImage(animatedGIFData: data)
                                    TMCache.sharedCache().setObject(data, forKey: imageURL.absoluteString)
                                }
                            })
                        }
                    } else {
                        imageView.sd_setImageWithURL(imageURL, placeholderImage: UIImage(named: "Placeholder"))

                }
                
                self.imageViews = imageViews
                self.imageDownloadOperations = downloadOperations
            }
        }
    }

    func clearImages() {
        if let imageViews = self.imageViews {
            for imageView in imageViews {
                imageView.sd_cancelCurrentAnimationImagesLoad()
                imageView.sd_cancelCurrentImageLoad()
                imageView.image = nil
                imageView.animatedImage = nil
                imageView.removeFromSuperview()
            }
        }
        
        if let operations = self.imageDownloadOperations {
            for operation in operations {
                operation.cancel()
            }
        }
        
        self.imageViews = nil
        self.imageDownloadOperations = nil
    }

    func imageAtPoint(point: CGPoint) -> UIImage? {
