small changes to sort's error messaging