fix accumulate bug