Fix sorting bug for rankings table (Fixes #2)