 
         setViewControllers(viewControllers, animated: true)
         selectedIndex = System.feedTab
+        previousViewController = viewControllers[selectedIndex].viewControllers.first
 
         let lineSeparator = UIView(frame: CGRect(x: 0, y: 0, width: view.frame.width, height: 1))
         lineSeparator.backgroundColor = UIColor.lightGray.withAlphaComponent(0.5)

        internalProfileViewControllerNavigationController.setNavigationBarHidden(true, animated: true)
        internalProfileViewControllerNavigationController.tabBarItem = UITabBarItem(title: "", image: #imageLiteral(resourceName: "profile_tab_bar_unselected").withRenderingMode(.alwaysOriginal), selectedImage: #imageLiteral(resourceName: "profile_tab_bar_selected").withRenderingMode(.alwaysOriginal))

        let viewControllers: [UIViewController] = [
            feedViewControllerNavigationController,
            discoverViewControllerNavigationController,
            searchViewControllerNavigationController,

    func tabBarController(_ tabBarController: UITabBarController, didSelect viewController: UIViewController) {
        if let navigationController = viewController as? UINavigationController,
            let visibleViewController = navigationController.topViewController as? ViewController,
            let scrollView = visibleViewController.mainScrollView,
            visibleViewController == previousViewController {
            // this is still buggy: issue with estimated row height
            let newOffset = CGPoint(x: 0, y: -1 * scrollView.adjustedContentInset.top)
            scrollView.setContentOffset(newOffset, animated: true)
            previousViewController = visibleViewController
        } else {
            previousViewController = (viewController as? UINavigationController)?.topViewController
        }
    }
}
