Fix signature of sort predicate