Fixed sorted -> sort in tests for #127