                     thumb.frame = CGRectMake(self.bounds.size.width - (normalKnobWidth + 1), thumb.frame.origin.y, normalKnobWidth, thumb.frame.size.height)
                 }
                 
-                background.backgroundColor = self.onTintColor
-                background.layer.borderColor = self.onTintColor.CGColor
+                backgroundView.backgroundColor = self.onTintColor
+                backgroundView.layer.borderColor = self.onTintColor.CGColor
                 thumb.backgroundColor = self.onThumbTintColor
                 onImageView.alpha = 1.0
                 offImageView.alpha = 0

            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);
                    background.backgroundColor = self.activeColor
                }
                else {
                    thumb.frame = CGRectMake(1, thumb.frame.origin.y, normalKnobWidth, thumb.frame.size.height);
                    background.backgroundColor = self.inactiveColor
                }
                
                background.layer.borderColor = self.borderColor.CGColor
                thumb.backgroundColor = self.thumbTintColor
                onImageView.alpha = 0
                offImageView.alpha = 1.0

                thumb.frame = CGRectMake(self.bounds.size.width - (normalKnobWidth + 1), thumb.frame.origin.y, normalKnobWidth, thumb.frame.size.height)
            }
            
            backgroundView.backgroundColor = self.onTintColor
            backgroundView.layer.borderColor = self.onTintColor.CGColor
            thumb.backgroundColor = self.onThumbTintColor
            onImageView.alpha = 1.0
            offImageView.alpha = 0
