add check to skip the navigation of paging when the page index is not available