Handle sorting failures