The sorting of document categories was incorrectly no longer based on sequence number

The sorting of document categories was incorrectly no longer based on sequence number.