Sort bug fixed