Corrected a mistake when using Sort