         tabCell.animator.delegate = cellDelegate
         tabCell.delegate = cellDelegate
 
-        let tab = tabs[indexPath.item]
+        guard let tab = tabList.at(indexPath.item) else {
+            assert(false)
+            return tabCell
+        }
         tabCell.style = tab.isPrivate ? .Dark : .Light
         tabCell.titleText.text = tab.displayTitle
 

    }

    @objc func collectionView(collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
        return tabs.count
    }
}


    }

    func tabManager(tabManager: TabManager, didRemoveTab tab: Browser) {
        var removedIndex = -1
        for i in 0..<tabDataSource.tabList.count() {
            let tabRef = tabDataSource.tabList.at(i)
            if tabRef == nil || getApp().tabManager.tabs.displayedTabsForCurrentPrivateMode.indexOf(tabRef!) == nil {
                removedIndex = i
                break
            }
        }

        tabDataSource.updateData()
        if (removedIndex < 0) {
            return
        }

        self.collectionView.deleteItemsAtIndexPaths([NSIndexPath(forItem: removedIndex, inSection: 0)])

        // Workaround: On iOS 8.* devices, cells don't get reloaded during the deletion but after the
