                     self.tableView.beginUpdates()
                     self.tableView.endUpdates()
                     self.view.layoutIfNeeded()
-                    }, completion: { finished in
-                        self.reloadButtonTitles()
-                        self.collectionView.imagePreviewLayout.showsSupplementaryViews = true
+                }, completion: { finished in
+                    self.reloadButtonTitles()
+                    self.collectionView.imagePreviewLayout.showsSupplementaryViews = true
                 })
             }
             else {
-                let possibleCell = collectionView.cellForItemAtIndexPath(indexPath)
-                if let cell = possibleCell {
+                if let cell = collectionView.cellForItemAtIndexPath(indexPath) {
                     var contentOffset = CGPointMake(cell.frame.midX - collectionView.frame.width / 2.0, 0.0)
                     contentOffset.x = max(contentOffset.x, -collectionView.contentInset.left)
                     contentOffset.x = min(contentOffset.x, collectionView.contentSize.width - collectionView.frame.width + collectionView.contentInset.right)

        tableView.dataSource = self
        tableView.delegate = self
        tableView.alwaysBounceVertical = false
        tableView.registerClass(ImagePreviewTableViewCell.self, forCellReuseIdentifier: NSStringFromClass(ImagePreviewTableViewCell.self))
        tableView.registerClass(UITableViewCell.self, forCellReuseIdentifier: NSStringFromClass(UITableViewCell.self))
        

        cell.textLabel?.textColor = tableView.tintColor
        cell.textLabel?.font = UIFont.systemFontOfSize(21)
        cell.textLabel?.text = actions[indexPath.row].title(selectedPhotoIndices.count)
        cell.layoutMargins = UIEdgeInsetsZero
        
        return cell
    }
