fixing invalid returns when looking for documents past the first