Fix a bug in which categories were not paginated.