Commit missing code related to sort.