Fixed navigation issue on page loading