anchor.diff:  		Acc, Charged, Reserved) ->
   	case lists:keytake(SessionId, 3, Reservations) of
   		{value, {_, Amount, _}, NewReservations}
  -				when Remain >= (Reserve - (Amount - Charge)),
  +				when Remain > 0, Remain >= (Reserve - (Amount - Charge)),
   				((Expires == undefined) or (Now < Expires)) ->
   			NewReservation = {Now, Reserve, SessionId},
   			NewBuckets = lists:reverse(Acc)
  
positive.code: 			reservations = [NewReservation | Reservations]} | T],
  	{Reserved + Amount, NewBuckets};
  reserve_session(Type, Amount, Now, SessionId,
  		[#bucket{remain_amount = 0} = B | T], Acc, Reserved) ->
  	reserve_session(Type, Amount, Now, SessionId, T, [B | Acc], Reserved);
  reserve_session(Type, Amount, Now, SessionId,
  		[#bucket{units = Type, remain_amount = Remain,
  		reservations = Reservations, termination_date = Expires} = B | T],
  		Acc, Reserved) when Remain < Amount,
  		((Expires == undefined) or (Now < Expires)) ->
  	NewReserve = Amount - Remain,
  	NewReservation = {Now, NewReserve, SessionId},
  
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);
  