fix sort column function order management