fix: avoid errors if only one page of results is returned

Closes #1