Fix for pagination

Pagination wasn't working until I made this change.