Pagination is now working.

Though there is some conflicts with the filtering.