anchor.diff:  update(Type, Charge, Reserve, Now, SessionId, [#bucket{units = Type,
   		remain_amount = Remain, termination_date = Expires} = B | T],
   		Acc, Charged, Reserved) when ((Expires == undefined) or (Now < Expires)),
  -		Remain =< Charge ->
  +		Remain >= 0, Remain =< Charge ->
   	NewAcc = [B#bucket{remain_amount = 0} | Acc],
   	update(Type, Charge - Remain, Reserve, Now,
   			SessionId, T, NewAcc, Charged + Remain, Reserved);
   update(Type, Charge, Reserve, Now, SessionId, [#bucket{units = Type,
   		remain_amount = Remain, termination_date = Expires,
   		reservations = Reservations} = B | T], Acc, Charged, Reserved)
  -		when ((Expires == undefined) or (Now < Expires)), Remain =< Reserve,
  -		Remain > 0 ->
  +		when ((Expires == undefined) or (Now < Expires)),
  +		Remain =< Reserve, Remain > 0 ->
   	NewReservation = {Now, Remain, SessionId},
   	NewAcc = [B#bucket{remain_amount = 0,
   		reservations = [NewReservation | Reservations]} | Acc],
  
positive.code: 			NewAcc = [B#bucket{reservations = NewReservations} | Acc],
  			charge_session(Type, Charged + Charge, Now, SessionId, T, Charge - Amount, NewAcc);
  		{value, {_, Amount, _}, []}
  				when Amount < Charge, Remain =< (Charge - Amount),
  				((Expires == undefined) or (Now < Expires)) ->
  			charge_session(Type, Charge - Amount - Remain, Now, SessionId, T, Amount + Remain, Acc);
  		{value, {_, Amount, _}, NewReservations}
  				when Amount < Charge, Remain =< (Charge - Amount),
  				((Expires == undefined) or (Now < Expires)) ->
  			NewAcc = [B#bucket{reservations = NewReservations} | Acc],
  			charge_session(Type, Charge - Amount - Remain, Now, SessionId, T, Amount + Remain, NewAcc);
  
negative.code: 					reservations = [NewReservation | NewReservations]} | T],
  			{Charged + Charge, Reserved + Reserve, NewBuckets};
  		{value, {_, Amount, _}, []}
  				when Remain >= 0, (Remain + Amount) =< Charge,
  				((Expires == undefined) or (Now < Expires)) ->
  			update_session(Type, Charge - (Remain + Amount), Reserve,
  					Now, SessionId, T, Acc, Charged + Remain + Amount, Reserved);
  