 
     func scrollViewDidScroll(scrollView: UIScrollView) {
         if let tab = tabManager.selectedTab,
-           let prev = self.previousScroll,
-           let readerModeBar = self.readerModeBar {
+           let prev = self.previousScroll {
+
             var totalToolbarHeight = header.frame.size.height
             let offset = scrollView.contentOffset
             let dy = prev.y - offset.y
 
             let scrollingSize = scrollView.contentSize.height - scrollView.frame.size.height
-            totalToolbarHeight += readerModeBar.hidden ? 0 : readerModeBar.frame.size.height
+            totalToolbarHeight += readerModeBar?.frame.size.height ?? 0
             totalToolbarHeight += self.toolbar?.frame.size.height ?? 0
 
             // Only scroll away our toolbars if,

}

class BrowserViewController: UIViewController {
    private var urlBar: URLBarView!
    private var readerModeBar: ReaderModeBarView!
    private var statusBarOverlay: UIView!
    private var toolbar: BrowserToolbar?
    private var homePanelController: HomePanelViewController?

        webViewContainer.snp_remakeConstraints { make in
            make.left.right.equalTo(self.view)

            if let readerModeBarBottom = readerModeBar?.snp_bottom {
                make.top.equalTo(readerModeBarBottom)
            } else {
                make.top.equalTo(self.header.snp_bottom)
            }
