Fixes a bug when calculating the total contributions. #46.