                 self.image = image
                 
                 // Fade out the thumbnail view
-                UIView.animateWithDuration(thumbnailFadeOutDuration, animations: {
+                UIView.animateWithDuration(imageFadeInDuration, animations: {
                     self.thumbnailImageView?.alpha = 0.0
+                    self.fadeInView?.alpha = 0.0
                     }, completion: { finished in
                         self.thumbnailImageView?.removeFromSuperview()
                         self.thumbnailImageView = nil
+                        self.fadeInView?.removeFromSuperview()
+                        self.fadeInView = nil
                 })
             }
         }

/**
An UIImageView that retrieves the image from ImageCache (default shared instance).
*/
public class CachedImageView: QvikImageView {
    private var thumbnailImageView: UIImageView? = nil
    
    /// Thumbnail image fadeout time in seconds
    public var thumbnailFadeOutDuration: NSTimeInterval = 0.3
    
    /// JPEG thumbnail data for the image. Should set this before layout cycle.
    public var thumbnailData: NSData? = nil
    
    /// ImageCache instance to use. Default value is the shared instance.
    public var imageCache = ImageCache.sharedInstance()

    public var imageChangedCallback: (Void -> Void)?
    
    /// Whether to automaticallty respond to image load notification
    @IBInspectable
    public var ignoreLoadNotification = false
    
    override public var image: UIImage? {
