anchor.diff:  handle_call(get_proc_count, _From, State) ->
       {reply, ets:info(State#state.tab, size), State};
   
  -handle_call({get_proc, #doc{body={Props}}=DDoc, DDocKey}, {Client, _}, State) ->
  +handle_call({get_proc, #doc{body={Props}}=DDoc, DDocKey}, From, State) ->
       Lang = couch_util:get_value(<<"language">>, Props, <<"javascript">>),
       try get_procs(State#state.tab, Lang) of
  +    [] ->
  +        spawn_link(?MODULE, new_proc, [From, Lang, DDoc, DDocKey]),
  +        {noreply, State};
       Procs ->
           case proc_with_ddoc(DDoc, DDocKey, Procs) of
           {ok, Proc0} ->
  +            Client = element(1, From),
               Proc = Proc0#proc{client = erlang:monitor(process, Client)},
               ets:insert(State#state.tab, Proc),
               {reply, {ok, Proc, get_query_server_config()}, State};
           {error, Reason} ->
               {reply, {error, Reason}, State}
           end
  -    catch {unknown_query_language, _} ->
  -        {reply, {unknown_query_language, Lang}, State};
  -    error:Reason ->
  +    catch error:Reason ->
           ?LOG_ERROR("~p ~p ~p", [?MODULE, Reason, erlang:get_stacktrace()]),
           {reply, {error, Reason}, State}
       end;
   
  -handle_call({get_proc, Lang}, {Client, _}, State) ->
  +handle_call({get_proc, Lang}, {Client, _} = From, State) ->
       try get_procs(State#state.tab, Lang) of
  +    [] ->
  +        spawn_link(?MODULE, new_proc, [From, Lang]),
  +        {noreply, State};
       [Proc0|_] ->
           Proc = Proc0#proc{client = erlang:monitor(process, Client)},
           ets:insert(State#state.tab, Proc),
           {reply, {ok, Proc, get_query_server_config()}, State}
  -    catch {unknown_query_language, _} ->
  -        {reply, {unknown_query_language, Lang}, State};
  -    error:Reason ->
  +    catch error:Reason ->
           ?LOG_ERROR("~p ~p ~p", [?MODULE, Reason, erlang:get_stacktrace()]),
           {reply, {error, Reason}, State}
       end;
  
positive.code:         set_timeout_fun = {Mod, set_timeout},
          stop_fun = {Mod, stop}
      },
      {ok, Proc}.
  
  get_query_server_config() ->
  
negative.code: handle_cast(_Msg, State) ->
      {noreply, State}.
  
  handle_info({'EXIT', _, {ok, Proc0, {Client,_} = From}}, State) ->
      link(Proc0#proc.pid),
      Proc = Proc0#proc{client = erlang:monitor(process, Client)},
      gen_server:reply(From, {ok, Proc, get_query_server_config()}),
      ets:insert(State#state.tab, Proc),
      {noreply, State};
  
  handle_info({'EXIT', Pid, Reason}, State) ->
      ?LOG_INFO("~p ~p died ~p", [?MODULE, Pid, Reason]),
      ets:delete(State#state.tab, Pid),
  