fixing sort order