Update to fix bug on page 2 to second to last page

Fixed bug where itemsPerPage was returning as string so 2nd parameter in the slice was too large