             * 1. Get section-specific metrics (minimumInteritemSpacing, sectionInset)
             */
             var minimumInteritemSpacing: Float
-            if let height = delegate.collectionView?(collectionView, layout: self, minimumInteritemSpacingForSection: section) {
+            if let height = delegate?.collectionView?(collectionView, layout: self, minimumInteritemSpacingForSection: section) {
                 minimumInteritemSpacing = height
             }
             else {

            return;
        }
        
        assert(delegate.conformsToProtocol(CollectionViewWaterfallLayoutDelegate), "UICollectionView's delegate should conform to WaterfallLayoutDelegate protocol")
        assert(columnCount > 0, "WaterfallFlowLayout's columnCount should be greater than 0")
        
        // Initialize variables

    }
    
    //MARK: Private Properties
    private weak var delegate: CollectionViewWaterfallLayoutDelegate?  {
        get {
            return collectionView.delegate as? CollectionViewWaterfallLayoutDelegate
        }
    }
    private var columnHeights = [Float]()
