fix accumlation error