fixed the pagination