Sorting for Dictionary ids