fixed tally bug