FIX: pagination when changing the number of items per page

The number of items to display handling was completely breaking the displaying of said items. Matvey helped finding the solution!