Pagination fix

See issue #14