adding minor optimization to prevent sorting of sorted docs
very minor