Sorted -> Sort names, for #127
Fixed sorted -> sort in tests for #127