Fix paginate.
Merge pull request #239 from Cal-CS-61A-Staff/paginate_fix

Fix pagination.