 
 // MARK: - Custom invalidation context
 
-private class TableLayoutInvaldationContext: UICollectionViewLayoutInvalidationContext {
-    
-    var invalidColumnHeaderFreezeState = false
+class TableLayoutInvaldationContext: UICollectionViewLayoutInvalidationContext {
+    
+    var invalidateColumnHeaderFreezeState = false
+    var invalidateFrozenColumns = false
     var invalidateRowSupplementaryViews = false
 }
 
 // MARK: - Internal helper methods -
 
 private extension CollectionViewTableLayout {
- 
+    
     func invalidateLayoutIfChanged<T: Equatable>(newValue: T, fromOldValue oldValue: T, contextCreator: (() -> TableLayoutInvaldationContext)? = nil) {
         if oldValue != newValue {
-            if let context = contextCreator?() {
-                invalidateLayoutWithContext(context)
-            } else {
-                invalidateLayout()
-            }
+            invalidateWithContextCreator(contextCreator)
+        }
+    }
+    
+    func invalidateWithContextCreator(contextCreator: (() -> TableLayoutInvaldationContext)?) {
+        if let context = contextCreator?() {
+            invalidateLayoutWithContext(context)
+        } else {
+            invalidateLayout()
         }
     }
 }

            
            // Check if we need to update the Y position of the column headers to keep them pinned to the top when scroll view is pull down too far
            if newInsetBounds.minY < 0 {
                context.invalidColumnHeaderFreezeState = true
            }

            // Check if we need to update the X position of the row headers to keep them pinned to the left or right when scrolling too far

                    return visibleRect.contains(CGPoint(x: x, y: visibleRect.midY))
                }
                
                var x: CGFloat = columnHeaderX
                for column in 0..<numberOfColumns {
                    var width = delegate.collectionView(collectionView, layout: self, columnWidthForTableColumn: column)
                    if width <= 0 {
                        println("Column \(column) has a width which is invalid, using a width of 80 instead")
                        width = 80
                    }
                    
                    // Add column header attribute
                    addColumnHeader(column, x, width)
                    
                    if let rowRange = rowRange where isXInCollectionViewBounds(x) {
                        // Pre calculate these items as they're going to be visible
                        for row in rowRange {
                            if let minY = rowYOffsets[row], maxY = rowFooterYOffsets[row] {
                                let indexPath = NSIndexPath(forTableColumn: column, inTableRow: row)
