Fixed rendering issues when scrolling and hiding the navigation bar.