Pagination 

Fixes pagination bug - issue #489