fixing async issue and loading screen for last page