anchor.diff:  create_entry(Node, Type, RT) ->
       NodeId = node:id(Node),
       Tree = get_rt_tree(RT),
  -    % search the adjacent fingers using the routing table
  -    PredLookup = util:gb_trees_largest_smaller_than(NodeId, Tree),
  -    RTSize = get_size(RT),
  -    case PredLookup of
  -        nil when RTSize =:= 0 -> % this is the first entry of the RT
  +    FirstNode = node:id(Node) =:= get_source_id(RT),
  +    case util:gb_trees_largest_smaller_than(NodeId, Tree)of
  +        nil when FirstNode -> % this is the first entry of the RT
               NewEntry = rt_entry_from(Node, Type, NodeId, NodeId),
  -            {NewEntry, NewEntry, NewEntry}
  -            ;
  +            {NewEntry, NewEntry, NewEntry};
           nil -> % largest finger
               {_PredId, Pred} = gb_trees:largest(Tree),
  -            get_adjacent_fingers_from(Pred, Node, Type, RT)
  -            ;
  +            get_adjacent_fingers_from(Pred, Node, Type, RT);
           {value, _PredId, Pred} ->
               get_adjacent_fingers_from(Pred, Node, Type, RT)
  -    end
  -    .
  +    end.
   
   % Get the tuple of adjacent finger ids with Node being in the middle:
   % {Predecessor, Node, Successor}
  
positive.code: -include("scalaris.hrl").
  
  % exports for unit tests
  -export([check_rt_integrity/1
          , check_well_connectedness/1
          , get_random_key_from_generator/3
      ]).
  
  % Make dialyzer stop complaining about unused functions
  % The following functions are only used when ?RT == rt_frtchord. Dialyzer should not
  
negative.code:     end
      .
  
  %% @doc Filter the source node's pid from a list of pids.
  -spec filter_source_pid(RT :: rt(), ListOfPids :: [pid()]) -> [pid()].
  filter_source_pid(RT,ListOfPids) ->
      SourcePid = node:pidX(rt_entry_node(get_source_node(RT))),
      [P || P <- ListOfPids, P =/= SourcePid].
  
  %% @doc Set up a set of subscriptions from a routing table
  -spec add_fd(RT :: rt())  -> ok.
  add_fd(#rt_t{} = RT) ->
      NewPids = to_pid_list(RT),
      % Filter the source node from the Pids, as we don't need an FD for that node. If the
      % source node crashes (which is the process calling this function), we are done
      % for.
      fd:subscribe(filter_source_pid(RT, NewPids)).
  
  %% @doc Update subscriptions
  -spec update_fd(OldRT :: rt(), NewRT :: rt()) -> ok.
  update_fd(OldRT, OldRT) -> ok;
  update_fd(#rt_t{} = OldRT, #rt_t{} = NewRT) ->
      OldPids = filter_source_pid(OldRT, to_pid_list(OldRT)),
      NewPids = filter_source_pid(NewRT, to_pid_list(NewRT)),
      fd:update_subscriptions(OldPids, NewPids).
  
  %% userdevguide-end rt_frtchord:check
  