anchor.diff:  
   %% @doc Calls RMFun (which may update the Neighborhood), then calls all
   %%      subscribers and updates the failure detector if necessary.
  --spec update_state(OldState::state_t(), RMFun::fun(() -> ?RM:state()))
  +-spec update_state(OldState::state_t(), RMFun::fun((?RM:state()) -> ?RM:state()))
           -> NewState::state_t().
   update_state(OldState, RMFun) ->
       update_state(OldState, RMFun, null).
   
  --spec update_state(OldState::state_t(), RMFun::fun(() -> ?RM:state()),
  +-spec update_state(OldState::state_t(), RMFun::fun((?RM:state()) -> ?RM:state()),
                      CrashedPid::comm:mypid() | null) -> NewState::state_t().
   update_state({OldRM_State, HasLeft, SubscrTable} = _OldState, RMFun, CrashedPid) ->
       OldNeighborhood = ?RM:get_neighbors(OldRM_State),
  -    NewRM_State = RMFun(),
  +    NewRM_State = RMFun(OldRM_State),
       NewNeighborhood = ?RM:get_neighbors(NewRM_State),
       call_subscribers(OldNeighborhood, NewNeighborhood, none, SubscrTable),
       update_failuredetector(OldNeighborhood, NewNeighborhood, CrashedPid),
  
positive.code: 
  % failure detector reported dead node
  -spec crashed_node(State::state(), DeadPid::comm:mypid()) -> state().
  crashed_node(State = {RM_State, _HasLeft, _SubscrTable}, DeadPid) ->
      RMFun = fun() -> ?RM:crashed_node(RM_State, DeadPid) end,
      NewState = update_state(State, RMFun, DeadPid),
      case config:read(rrepair_after_crash) of
          true ->
              OldPred = nodelist:pred(?RM:get_neighbors(RM_State)),
              NewNeighb = ?RM:get_neighbors(element(1, NewState)),
              NewPred = nodelist:pred(NewNeighb),
              case NewPred of
  
negative.code: 
  %% @doc Message handler when the rm_loop module is fully initialized.
  -spec on(message() | ?RM:custom_message(), state()) -> state().
  on({rm, notify_new_pred, NewPred}, State) ->
      RMFun = fun(RM_State) -> ?RM:new_pred(RM_State, NewPred) end,
      update_state(State, RMFun);
  
  on({rm, notify_new_succ, NewSucc}, State) ->
      RMFun = fun(RM_State) -> ?RM:new_succ(RM_State, NewSucc) end,
      update_state(State, RMFun);
  
  on({rm, notify_slide_finished, SlideType}, State = {RM_State, _HasLeft, SubscrTable}) ->
  