         UIView.animateWithDuration(0.3, delay: 0.0, options: UIViewAnimationOptions.CurveEaseOut | UIViewAnimationOptions.BeginFromCurrentState, animations: {
                 if self.on {
                     thumb.frame = CGRectMake(self.bounds.size.width - (activeKnobWidth + 1), thumb.frame.origin.y, activeKnobWidth, thumb.frame.size.height)
-                    background.backgroundColor = self.onTintColor
+                    backgroundView.backgroundColor = self.onTintColor
                     thumb.backgroundColor = self.onThumbTintColor
                 }
                 else {
                     thumb.frame = CGRectMake(thumb.frame.origin.x, thumb.frame.origin.y, activeKnobWidth, thumb.frame.size.height)
-                    background.backgroundColor = self.activeColor
+                    backgroundView.backgroundColor = self.activeColor
                     thumb.backgroundColor = self.thumbTintColor
                 }
             }, completion: {

            let frame = self.frame
            
            // background
            background.frame = CGRectMake(0, 0, frame.size.width, frame.size.height)
            background.layer.cornerRadius = self.isRounded ? frame.size.height * 0.5 : 2
            
            // images
            onImageView.frame = CGRectMake(0, 0, frame.size.width - frame.size.height, frame.size.height)

            UIView.animateWithDuration(0.3, delay: 0.0, options: UIViewAnimationOptions.CurveEaseOut | UIViewAnimationOptions.BeginFromCurrentState, animations: {
                if self.tracking {
                    thumb.frame = CGRectMake(1, thumb.frame.origin.y, activeKnobWidth, thumb.frame.size.height);
                    backgroundView.backgroundColor = self.activeColor
                }
                else {
                    thumb.frame = CGRectMake(1, thumb.frame.origin.y, normalKnobWidth, thumb.frame.size.height);
                    backgroundView.backgroundColor = self.inactiveColor
                }
                
                backgroundView.layer.borderColor = self.borderColor.CGColor
                thumb.backgroundColor = self.thumbTintColor
                onImageView.alpha = 0
                offImageView.alpha = 1.0
