fixing bug with nav bar on scrolling