Fix sorting
Merge pull request #180 from palourde/issue_sorting

Fix sorting