anchor.diff:      case lists:keytake(Ref, 1, Servers) of
           false ->
               {reply, {error, not_found}, State};
  -        {value, {_, WApps, WPid}, Rest} ->
  +        {value, {_, WebApps, WebPid, WebMon}, Rest} ->
               Apps1 = case lists:keytake({AppId, Ref}, 1, Apps) of
                   false -> Apps;
  -                {value, {_, Mon}, RestApps} -> erlang:demonitor(Mon), RestApps
  +                {value, {_, AppMon}, RestApps} -> erlang:demonitor(AppMon), RestApps
               end,
               State1 = State#state{apps=Apps1},
  -            case lists:member(AppId, WApps) of
  +            case lists:member(AppId, WebApps) of
                   true ->
  -                    case WApps -- [AppId] of
  +                    case WebApps -- [AppId] of
                           [] ->
  +                            erlang:demonitor(WebMon),
                               Reply = do_stop_server(Ref),
                               {reply, Reply, State1#state{servers=Rest}};
  -                        WApps1 ->
  -                            Servers1 = [{Ref, WApps1, WPid}|Rest],
  +                        WebApps1 ->
  +                            Servers1 = [{Ref, WebApps1, WebPid, WebMon}|Rest],
                               {reply, ok, State1#state{servers=Servers1}}
                       end;
                   false ->
  
positive.code: -spec handle_cast(term(), #state{}) ->
      gen_server_cast(#state{}).
  
  handle_cast(stop_all, State) ->
      nksip_webserver_sup:terminate_all(),
      {noreply, State#state{servers=[]}};
  
negative.code:             case lists:keytake(Ref, 1, Servers) of
                  false ->
                      case do_start_server(Ref, Disp, Opts) of
                          {ok, WebPid} ->
                              AppMon = erlang:monitor(process, AppPid),
                              Apps1 = [{{AppId, Ref}, AppMon}|Apps],
                              State1 = State#state{apps=Apps1},
                              % We will receive a {webserver_started, _, _} msg
                              {reply, {ok, WebPid}, State1};
                          {error, Error} ->
                              {reply, {error, Error}, State}
                      end;
                  {value, {_, WebApps, WebPid, WebMon}, Rest} ->
                      case lists:member(AppId, WebApps) of
                          true -> 
                              {reply, {error, already_started}, State};
                          false ->
                              Servers1 = [{Ref, [AppId|WebApps], WebPid, WebMon}|Rest],
                              AppMon = erlang:monitor(process, AppPid),
                              Apps1 = [{{AppId, Ref}, AppMon}|Apps],
                              State1 = State#state{servers=Servers1, apps=Apps1},
                              {reply, {ok, WebPid}, State1}
                      end
              end;
          undefined ->
  