When clicking the "Last page" button, a 404 is displayed. This is because the number of pages is incorrect. On the first page the last page number is 496. When clicking on the page 2 link, the last page is 100, and that link works.
Any idea where I need to look to solve this?