     fileprivate var contentView: UIView
     fileprivate var isSetupFinished: Bool = false
     open var isExpanded: Bool = false
-    fileprivate var rightMiddleItemSpacingConstraint: NSLayoutConstraint!
-    fileprivate var leftMiddleItemSpacingConstraint: NSLayoutConstraint!
+
+    fileprivate var middleItemSpacingConstraint: NSLayoutConstraint?
+    fileprivate var rightMiddleItemSpacingConstraint: NSLayoutConstraint?
+    fileprivate var leftMiddleItemSpacingConstraint: NSLayoutConstraint?
     fileprivate var rightItemSpacingConstraints: [NSLayoutConstraint] = []
     fileprivate var leftItemSpacingConstraints: [NSLayoutConstraint] = []
-    
+
     open var imageSpacing: CGFloat = 4.0
     open var onExpanded: (()->())?
     open var onCollapsed:(()->())?

        else {
            contentView.frame = CGRect(x: scrollView.frame.origin.x, y: scrollView.frame.origin.y, width: scrollView.frame.width, height: scrollView.frame.height)
            scrollView.contentSize = CGSize(width: contentView.frame.width, height: scrollView.frame.height)
            
            for constraint in rightItemSpacingConstraints { constraint.constant = -imageWidth*0.8 }
            for constraint in leftItemSpacingConstraints { constraint.constant = imageWidth*0.8 }
            

            layoutConstraints.append(NSLayoutConstraint(item: middleLeftView, attribute: .width, relatedBy: .equal, toItem: contentView, attribute: .height, multiplier: 0.6, constant: 0))
            layoutConstraints.append(NSLayoutConstraint(item: middleLeftView, attribute: .height, relatedBy: .equal, toItem: contentView, attribute: .height, multiplier: 0.6, constant: 0))
            self.leftMiddleItemSpacingConstraint = NSLayoutConstraint(item: middleLeftView, attribute: NSLayoutAttribute.centerX, relatedBy: .equal, toItem: contentView, attribute: .centerX, multiplier: 1, constant: needsToAdjust ? realContractedCenterOffset - (imageWidth / 10) : -(imageWidth / 10))

            layoutConstraints.append(self.rightMiddleItemSpacingConstraint!)
            layoutConstraints.append(self.leftMiddleItemSpacingConstraint!)
        }
        
        // Add constraints iteratively for the non-middle Avatars
