Improve sorting in text section.