anchor.diff:  do_receive(State) ->
   	% Listen for messages being sent to the process.
   	{Reply, NewState, From} = receive
  -		{From1, Msg} ->
  +		{From1, Msg} when is_pid(From1) ->
   			{Reply1, NewState1} = handle_msg(Msg, From1, State),
  -			{Reply1, NewState1, From1}
  +			{Reply1, NewState1, From1};
  +		Other ->
  +			?error("pre_entity_engine_worker:do_receive: Received invalid message: ~p", [Other]),
  +			{noreply, State, undefined}
   	end,
   
   	% Handle potential replies
  
positive.code: 	pg2:join(entity_updates, self()),
  
  	% Start the simulation timer
  	erlang:send_after(?INTERVAL, self(), simulate),
  
  	% Start the receive loop.
  	do_receive(InitialState).
  
negative.code: %% --------------------------------------------------------------------------------------------------------------------
  
  init(InitialEntities) ->
  	?info("pre_entity_engine_worker:init(~p)", [InitialEntities]),
  
  	% Set our priority to high.
  	process_flag(priority, high),
  
  