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

Closes #1
responding to pull request changes round 1
Merge pull request #2 from juliemr/master

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