anchor.diff:  				case mnesia:read(subscriber, Identity, write) of
   					[#subscriber{buckets = Buckets, attributes = Attributes,
   							enabled = Enabled, disconnect = Disconnect} = Entry] ->
  -						case bucket_balance(Buckets) of
  -							Balance when Balance > 0 ->
  +						F2 = fun(#bucket{remain_amount = RM}) when
  +											RM#remain_amount.amount > 0 ->
  +										true;
  +									(_) ->
  +										false
  +						end,
  +						case lists:any(F2, Buckets) of
  +							true ->
   								case {Enabled, Disconnect, Entry#subscriber.password} of
   									{true, false, Password} ->
   										{Password, Attributes};
  
positive.code: 									{_, _, _} ->
  										throw(bad_password)
  								end;
  							Balance when Balance =< 0 ->
  								throw(out_of_credit)
  						end;
  					[] ->
  
negative.code: 			exit(not_found)
  	end.
  
  