Fix bugs in medalist computation.
Merge branch 'master' into develop