anchor.diff:  		charging_key = ChargingKey} = State) ->
   	Rated2 = Rated1#rated{price_type = PriceType, currency = Currency},
   	case charge_session(Units, Amount,
  -			ServiceId, ChargingKey, SessionId, Buckets1) of
  +			ServiceId, ChargingKey, SessionId, Buckets) of
   		{Amount, Buckets2} ->
   			{Debits, Buckets3} = get_final(ServiceId,
   					ChargingKey, SessionId, Buckets2),
   			Rated3 = rated(Debits, Rated2),
   			charge3(Service, Product, Buckets3, final, DebitAmount, DebitAmount,
  -					ReserveAmount, ReserveAmount, State#state{rated = Rated3});
  +					ReserveAmount, ReserveAmount, State#state{rated = Rated3}, Buckets);
   		{UnitsCharged, Buckets2} when UnitsCharged < Amount ->
   			{UnitCharge, PriceCharge} = price_units(Amount - UnitsCharged,
   					UnitSize, UnitPrice),
  
positive.code: 						{NewChargeUnits, 0, Buckets4} ->
  							charge3(Service, Product, Buckets4, interim,
  									DebitAmount, {Units, UnitsCharged},
  									{Units, 0}, {Units, 0}, State);
  						{NewUnitsCharged, 0, Buckets4}
  								when NewUnitsCharged < NewChargeUnits->
  							Now = erlang:system_time(millisecond),
  
negative.code: 									units = Units, product = [ProductId]} | Buckets4],
  							charge3(Service, Product, Buckets5, interim, DebitAmount,
  									{Units, UnitsCharged + NewUnitsCharged},
  									ReserveAmount, {Units, 0}, State, Buckets)
  					end;
  				false ->
  					Now = erlang:system_time(millisecond),
  