Sort : minor modifications