Merge "Address sorting edge case." into sc-dev