Fixed the pagination