                     return
                 }
                 
-                var offsetY = initialInsetTop + scrollView.contentOffset.y
+                if bounds.height <= 0 {
+                    return
+                }
+                
+                var offsetY = scrollView.contentOffset.y
+                if refreshing == true {
+                    offsetY += initialInsetTop
+                } else {
+                    offsetY += scrollView.contentInset.top
+                }
                 frame.origin.y = offsetY
                 
                 if allTargets().count <= 0 {

                indicator.stopAnimation(false, completion: completion)
            }
        } else {
            stopAnimationsHandler = nil
            indicatorView.layer.removeAnimationForKey(LotateAnimationKey)
            starting = false
            pathLayer = nil
            
            completion?(self)

    private var animationCount: Double = 0
    private var pathLayer: CAShapeLayer? {
        willSet {
            self.pathLayer?.removeAllAnimations()
            self.pathLayer?.removeFromSuperlayer()
        }
    }
