                 let gradientMask = self.layer.mask as? CAGradientLayer
                 gradientMask?.colors = finalColors
             }
-            self.layer.mask?.removeAnimationForKey("setupFade")
+            maskLayer?.removeAnimationForKey("setupFade")
             
             // Generate animation if needed
             gradientAnimation = {

        return self.layer as! CAReplicatorLayer
    }
    
    override public func drawLayer(layer: CALayer, inContext ctx: CGContext) {
        // Do NOT call super, to prevent UILabel superclass from drawing into context
        // Label drawing is handled by sublabel and CAReplicatorLayer layer class

    
    private func applyGradientMask(fadeLength: CGFloat, animated: Bool) {
        // Remove any in-flight animations
        maskLayer?.removeAllAnimations()
        
        // Check for zero-length fade
        if (fadeLength <= 0.0) {
