         StaticStruct.sizingCell?.updateConstraintsIfNeeded()
         StaticStruct.sizingCell?.setNeedsLayout()
         StaticStruct.sizingCell?.layoutIfNeeded()
-        return (StaticStruct.sizingCell?.cellContentHeight())!
+        guard let height = StaticStruct.sizingCell?.cellContentHeight() else {
+            return 0
+        }
+        return height
     }
     
 

    //MARK: table view datasource
    
    func tableView(tableView: UITableView, cellForRowAtIndexPath indexPath: NSIndexPath) -> UITableViewCell {
        let cell : ExpandableTableViewCell = tableView.dequeueReusableCellWithIdentifier("CellID") as! ExpandableTableViewCell
        let item = self.dataSourceArray[indexPath.row]
        cell.setCellContent(item, isExpanded: self.expandedIndexPaths.contains(indexPath))
        cell.selectionStyle = UITableViewCellSelectionStyle.None

        } // workaround to add static variables inside function in swift
        dispatch_once(&StaticStruct.onceToken) { () -> Void in
            StaticStruct.sizingCell = self.tableView.dequeueReusableCellWithIdentifier("CellID") as? ExpandableTableViewCell
            
        }
        let item = self.dataSourceArray[indexPath.row]
        StaticStruct.sizingCell?.setCellContent(item, isExpanded: self.expandedIndexPaths.contains(indexPath))
