         smallArcLayer.path = smallArcpath.cgPath
         smallArcLayer.strokeColor = color.cgColor
         smallArcLayer.fillColor = UIColor.clear.cgColor
-        smallArcLayer.lineWidth = frame.width/4
+        smallArcLayer.lineWidth = bounds.width/4
         smallArcLayer.lineCap = kCALineCapRound
         
         return smallArcLayer

    // MARK: Create views
    
    private func getCircleLayer(color: UIColor) -> CAShapeLayer {
        let circlePath = UIBezierPath(ovalIn: CGRect(x: 0.0, y: frame.maxY - frame.size.height/4, width: frame.size.width/4, height: frame.size.height/4))
        
        let circleLayer = CAShapeLayer()
        circleLayer.path = circlePath.cgPath

        largeArcLayer.path = largeArcpath.cgPath
        largeArcLayer.strokeColor = color.cgColor
        largeArcLayer.fillColor = UIColor.clear.cgColor
        largeArcLayer.lineWidth = bounds.width/4
        largeArcLayer.lineCap = kCALineCapRound
        
        return largeArcLayer
    }
    
    private func getSmallArcLayer(color: UIColor, lineWidth: CGFloat) -> CAShapeLayer {
        let radius = bounds.size.height/2 + lineWidth/2
        
        let smallArcpath = UIBezierPath(arcCenter: CGPoint(x: 0, y: bounds.maxY),
                                        radius: radius,
                                        startAngle:  .pi * (3 / 2) + asin((lineWidth/2) / (radius + (lineWidth/2))),
                                        endAngle: -asin((lineWidth/2) / (radius + (lineWidth/2))),
