                 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

                    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
                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.on {
                    thumb.frame = CGRectMake(self.bounds.size.width - (activeKnobWidth + 1), thumb.frame.origin.y, activeKnobWidth, thumb.frame.size.height)
                    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)
                    backgroundView.backgroundColor = self.activeColor
                    thumb.backgroundColor = self.thumbTintColor
                }
            }, completion: {
