Tweaks to sorting again.