correct sort() in sorted.outcome.rank() function