fix sorting for ints and percents

Can't seem to remove the old PR..