Fix pagination parsing

Fixes #137