managing the page loading issue