Fixed problem when returning an empty document list