 
 		// invalidate layout to center first and last
 		let currentCollectionViewSize = collectionView.bounds.size
-		if !currentCollectionViewSize.equalTo(lastCollectionViewSize) || lastScrollDirection != scrollDirection {
+		if !currentCollectionViewSize.equalTo(lastCollectionViewSize) || lastScrollDirection != scrollDirection || lastItemSize != itemSize {
 			let inset: CGFloat
 			switch scrollDirection {
 			case .horizontal:

	
	private var lastCollectionViewSize: CGSize = CGSize.zero
	private var lastScrollDirection: UICollectionViewScrollDirection!
	
	public override init() {
		super.init()

			}
			lastCollectionViewSize = currentCollectionViewSize
			lastScrollDirection = scrollDirection
            lastItemSize = itemSize
		}
	}
	
