Fix bug where pagination.pageCount was a string instead of a number