anchor.diff:      end;
   
       //Keep track of how many are ordered
  -    fResourceDeliveryCount[I] := Max(fResourceDeliveryCount[I] - aCount, 0);
  +    ResDeliveryCnt[I] := ResDeliveryCnt[I] - aCount;
   
       Assert(ResIn[I] >= aCount, 'fResourceIn[i] < 0');
       ResIn[I] := ResIn[I] - aCount;
       //Only request a new resource if it is allowed by the distribution of wares for our parent player
       for K := 1 to aCount do
  -      if fResourceDeliveryCount[I] < GetResDistribution(I) then
  +      if ResDeliveryCnt[I] < GetResDistribution(I) then
         begin
           gHands[fOwner].Deliveries.Queue.AddDemand(Self, nil, aWare, 1, dtOnce, diNorm);
  -        Inc(fResourceDeliveryCount[I]);
  +        ResDeliveryCnt[I] := ResDeliveryCnt[I] + 1;
         end;
       Exit;
     end;
  
positive.code:   for I := 1 to 4 do
      if aWare = gRes.Houses[fType].ResInput[I] then
      begin
        fResourceDeliveryCount[I] := Max(0, fResourceDeliveryCount[I] - 1);
        Exit;
      end;
  end;
  
negative.code:     end;
  
      //Keep track of how many are ordered
      ResDeliveryCnt[I] := ResDeliveryCnt[I] - aCount;
  
      Assert(ResIn[I] >= aCount, 'fResourceIn[i] < 0');
      ResIn[I] := ResIn[I] - aCount;
      //Only request a new resource if it is allowed by the distribution of wares for our parent player
      for K := 1 to aCount do
        if ResDeliveryCnt[I] < GetResDistribution(I) then
        begin
          gHands[fOwner].Deliveries.Queue.AddDemand(Self, nil, aWare, 1, dtOnce, diNorm);
          ResDeliveryCnt[I] := ResDeliveryCnt[I] + 1;
        end;
      Exit;
    end;
  