fix bug where list length > 9 b/c of lexicographic ordering