Fixed a bug in which for the first time on navbar click, scrolls to wrong pos