Fix the sorting of ranking column