anchor.diff:      Q = all(#torrent.id),
       {reply, Q, S};
   handle_call({num_pieces, Id}, _F, S) ->
  -    [R] = ets:lookup(?TAB, Id),
  -    {reply, {value, R#torrent.pieces}, S};
  +    Reply = case ets:lookup(?TAB, Id) of
  +		[R] -> {value, R#torrent.pieces};
  +		[] ->  not_found
  +	    end,
  +    {reply, Reply, S};
   handle_call({statechange, Id, What}, _F, S) ->
       Q = state_change(Id, What),
       {reply, Q, S};
  
positive.code: 
  %% @doc Return the number of pieces for torrent Id
  %% @end
  -spec num_pieces(integer()) -> {value, integer()}.
  num_pieces(Id) ->
      gen_server:call(?SERVER, {num_pieces, Id}).
  
  
negative.code: state_change(_Id, []) ->
      ok;
  state_change(Id, [What | Rest]) ->
      %% @todo Be more protective here
      [T] = ets:lookup(?TAB, Id),
      New = case What of
                unknown ->
  