Fix bug, these changes should go with previous commit -refs BT#8403
Merge pull request #56 from DeEvo/8403

Fix issue with slow documents listing, these changes should go with previous commit - refs BT#8403