anchor.diff:                case {InPid} =/= RTM of
                     true -> case RTM of
                                 unknown -> ok;
  -                              _ -> fd:unsubscribe(element(1, RTM), tx_tm_rtm_fd_cookie)
  +                              _ -> fd:unsubscribe_refcount(element(1, RTM), tx_tm_rtm_fd_cookie)
                             end,
  -                          fd:subscribe(InPid, tx_tm_rtm_fd_cookie);
  +                          fd:subscribe_refcount(InPid, tx_tm_rtm_fd_cookie);
                     false -> ok
                 end,
                 rtm_entry_new(InKey, {InPid}, get_nth(Entry), {InAccPid});
  
positive.code:         false ->
              on(Msg, State)
      end;
  
  on_init({crash, Pid, _Cookie}, State) ->
      on_init({crash, Pid}, State);
  on_init({crash, _Pid} = Msg, State) ->
      %% only in tx_tm
      on(Msg, State).
  
  %% functions for periodic RTM updates
  -spec rtm_update(rtms()) -> ok.
  rtm_update(RTMs) ->
      _ = [ begin
                Name = get_nth_rtm_name(get_nth(RTM)),
                Key = get_rtmkey(RTM),
                api_dht_raw:unreliable_lookup(Key, {get_rtm, comm:this(), Key, Name})
            end
            || RTM <- RTMs],
      msg_delay:send_local(config:read(tx_rtm_update_interval) div 1000,
                            self(), {update_RTMs}),
      ok.
  
  %% functions for tx processing
  
negative.code:                   {[rtm_entry_new(X, unknown, I, unknown) | Acc ], I - 1}
                  end,
                  {[], length(RTM_ids) - 1}, RTM_ids),
      rtm_update(NewRTMs, 1, {update_RTMs_on_init}),
      state_set_RTMs(State, NewRTMs);
  
  on_init({update_RTMs}, State) ->
      rtm_update(state_get_RTMs(State),
                 config:read(tx_rtm_update_interval) div 1000,
                 {update_RTMs}),
      State;
  on_init({update_RTMs_on_init}, State) ->
      ?TRACE_RTM_MGMT("tx_tm_rtm:on_init:update_RTMs in Pid ~p ~n", [self()]),
      rtm_update(state_get_RTMs(State), 1, {update_RTMs_on_init}),
      State;
  
  on_init({get_rtm_reply, InKey, InPid, InAcceptor}, State) ->
  