Fixed pagination. Fixes #37