fixes pagination bug when viewing items by category