anchor.diff:              {Type, Misc}
       end.
   
  -add_local_backtracks(Transition, #dpor_state{trace = Trace} = State) ->
  +add_local_backtracks(Transition, #dpor_state{preemption_bound = PreBound,
  +                                             trace = Trace} = State) ->
       [TraceTop|RestTrace] = Trace,
       #trace_state{backtrack = Backtrack, nexts = Nexts, enabled = Enabled,
  -                 sleep_set = SleepSet} =
  -        TraceTop,
  -    NewBacktrack = add_local_backtracks(Transition, Nexts, Enabled, Backtrack),
  -    SleepingRemoved = ordsets:subtract(NewBacktrack, SleepSet),
  -    NewTrace = [TraceTop#trace_state{backtrack = SleepingRemoved}|RestTrace],
  -    State#dpor_state{trace = NewTrace}.
  +                 sleep_set = SleepSet, preemptions = Preemptions,
  +                 last = {LLid, _}} = TraceTop,
  +    Allowed =
  +        case ordsets:is_element(LLid, Enabled) of
  +            false -> true;
  +            true -> Preemptions < PreBound
  +        end,
  +    case Allowed of
  +        true ->
  +            NewBacktrack = add_local_backtracks(Transition, Nexts, Enabled, Backtrack),
  +            SleepingRemoved = ordsets:subtract(NewBacktrack, SleepSet),
  +            case Backtrack =/= SleepingRemoved of
  +                true ->
  +                    ?f_debug("OldBacktrack:~w\n",[Backtrack]),
  +                    ?f_debug("Sleeping:~w\n",[SleepSet]),
  +                    ?f_debug("Local adds: ~w\n",[ordsets:subtract(SleepingRemoved, Backtrack)]);
  +                false -> ok
  +            end,
  +            NewTrace = [TraceTop#trace_state{backtrack = SleepingRemoved}|RestTrace],
  +            State#dpor_state{trace = NewTrace};
  +        false ->
  +            State
  +    end.
   
   add_local_backtracks({NLid, _} = Transition, Nexts, AllEnabled, Backtrack) ->
       Fold =
  
positive.code:         {'receive', Info} when
                Info =:= unblocked;
                Info =:= had_after ->
              {case Info of
                   unblocked -> Backtrack;
                   had_after -> ordsets:add_element(Lid, Backtrack)
               end,
               ordsets:del_element(Lid, Pollable),
               ordsets:del_element(Lid, Blocked),
               ordsets:add_element(Lid, Enabled),
  
negative.code:                     false ->
                          case ErrorNext of
                              none ->
                                  case ordsets:is_element(Lid, Candidates) of
                                      true -> [Lid];
                                      false -> ?f_debug("Picked: ~w\n",[H]), [H]
                                  end;
                              Else ->
                                  ?f_debug("Picked to crash: ~w\n",[H]),
                                  [Else]
  