Fix sort issue