Fix bugs in medalist computation.