correct sort error