fixed ranks to take the lowest rank on ties,  still need to implement fix for when the pope is elected and all go to zero