Moved the selection.sort()
Merge pull request #876 from gorco/reorderSelection

sort selection