Fix bug on page load using previous/next navigation arrows