fix ordering when two or more columns have the same weight