     public func scrollToCenter(index: Int, offset: CGFloat, animated: Bool, animation: (Void -> Void)?, completion: (Void -> Void)?) {
         guard self.infiniteDataSource.totalItemCount() > 0 else { return }
         if self.bounds.isEmpty { return }
-        
+      
+        self.setNeedsLayout()
+        self.layoutIfNeeded()
+      
         var bounds = self.bounds
         let visible = bounds.size.width
         

        
        self.scrolling += 1
        self.setContentOffset(self.contentOffset, animated: false)
        UIView.animateKeyframesWithDuration(
            animated ? 0.25 : 0,
            delay: 0,
            options: .BeginFromCurrentState,
            animations: { () -> Void in
                self.bounds = bounds
                animation?()
            }, completion: { finished in

                self.setNeedsLayout()
                self.layoutIfNeeded()
                completion?()
            })
        } else {
            self.bounds = bounds
            self.scrolling -= 1
            completion?()
        }
    }
    
    public func scrollToCenter(index: Int, animated: Bool, animation: (Void -> Void)?, completion: (Void -> Void)?) {
