 
             let path = UIBezierPath()
             path.moveToPoint(CGPoint(x:origin.x, y:origin.y))
-            path.addLineToPoint(CGPoint(x: origin.x + (size.width * CGFloat(progress)), y: origin.y))
+            path.addLineToPoint(CGPoint(x: origin.x + (size.width * CGFloat(max(0,min(progress,1)))), y: origin.y))
             path.lineWidth = 4.0
             UIColor.blueColor().setStroke()
             path.stroke()
-
         }
 
         glyphImage = UIGraphicsGetImageFromCurrentImageContext()

    ///
    public var progress: Double? = nil {
        willSet {
            if newValue != progress {
                glyphImage = nil
            }

        image.drawInRect(CGRect(origin: origin, size: size))

        if let progress = progress {
            let box = UIBezierPath()
            box.moveToPoint(CGPoint(x:origin.x, y:origin.y))
            box.addLineToPoint(CGPoint(x: origin.x + size.width, y: origin.y))
