Fix initialization of sort.