Improved section sorting in backend.