anchor.diff:  	{ok, UserName} = radius_attributes:find(?UserName, Attributes),
   	ok = ocs_log:acct_log(radius, {ServerAddress, ServerPort}, stop, Attributes),
   	Subscriber = ocs:normalize(UserName),
  -	case decrement_balance(Subscriber, Usage) of
  +	case update_sub_values(Subscriber, Usage, AcctSessionId, NasId, Attributes) of
   		{ok, OverUsed, false} when OverUsed =< 0 ->
   			case client_disconnect_supported(Address) of
   				true ->
  
positive.code: 				true
  		end.
  
  
negative.code: 			authenticator = ResponseAuthenticator, attributes = []},
  	radius:codec(Response).
  
  -spec update_sub_values(Subscriber, Usage, AcctSessionID, Nas, Attributes) ->
  		Result
  	when
  			Subscriber :: string() | binary(),
  			Usage :: non_neg_integer(),
  			AcctSessionID :: integer(),
  			Nas :: string() | inet:ip_address(),
  			Attributes :: radius_attributes:attributes(),
  			Result :: {ok, NewBalance, DiscFlag} | {error, Reason},
  			Reason :: term(),
  			NewBalance :: integer(),
  			DiscFlag :: boolean().
  %% @doc Decrements subscriber's current balance
  update_sub_values(Subscriber, Usage, AcctSessionID, Nas, Attributes)
  		when is_list(Subscriber) ->
  	update_sub_values(list_to_binary(Subscriber), Usage, AcctSessionID, Nas,
  		Attributes);
  update_sub_values(Subscriber, Usage, AcctSessionID, Nas, Attributes)
  		when is_binary(Subscriber), Usage >= 0 ->
  	F = fun() ->
  				case mnesia:read(subscriber, Subscriber, write) of
  					[#subscriber{balance = Balance, disconnect = Flag,
  								session_attributes = SessionList} = Entry] ->
  						NewSessionList = remove_session(SessionList, AcctSessionID, Nas,
  								Subscriber, Attributes),
  						NewBalance = Balance - Usage,
  						NewEntry = Entry#subscriber{balance = NewBalance,
  								session_attributes = NewSessionList},
  						mnesia:write(subscriber, NewEntry, write),
  						{NewBalance, Flag};
  					[] ->
  