Fix the pagination system in the API call part