 
 private class TopSitesLayout: UICollectionViewLayout {
     private var thumbnailRows: Int {
-        return Int((self.collectionView?.frame.height ?? self.thumbnailHeight) / self.thumbnailHeight)
+        return max(2, Int((self.collectionView?.frame.height ?? self.thumbnailHeight) / self.thumbnailHeight))
     }
 
     private var thumbnailCols = 2

        if let data = result.successValue {
            self.dataSource.data = data
            self.dataSource.profile = self.profile
        }
    }



    let profile: Profile

    override func viewWillTransitionToSize(size: CGSize, withTransitionCoordinator coordinator: UIViewControllerTransitionCoordinator) {
        super.viewWillTransitionToSize(size, withTransitionCoordinator: coordinator)
        self.refreshHistory(self.layout.thumbnailCount)
        self.layout.setupForOrientation(UIView.viewOrientationForSize(size))
    }

    override func supportedInterfaceOrientations() -> Int {
        return Int(UIInterfaceOrientationMask.AllButUpsideDown.rawValue)
    }

    init(profile: Profile) {
        self.profile = profile
        super.init(nibName: nil, bundle: nil)
