Revert "Patches to sorting..."

This reverts commit f72f856cd9bb3a19f18b5fbad230cb9d635255da.