Fix for pagination

Closes #21