fix the pagination