Fix avr sorting.