bug corrected for the contribution computation