anchor.diff:      // Calculate when will be ware depleted
       Exhaustion := 99;
       if (ActualConsumption - Production > 0) then
  -      Exhaustion := gHands[fOwner].Stats.GetWareBalance(aWT) / (ActualConsumption - Production);
  +      Exhaustion := Min( Exhaustion, gHands[fOwner].Stats.GetWareBalance(aWT) / (ActualConsumption - Production) );
       HouseReqCnt := Ceil(( Max(ActualConsumption, FinalConsumption) - Production) / Max(0.0001, ProductionRate[aWT]*1.0));
       Fraction := HouseReqCnt / Max(1.0,((fCityStats.Houses[HT] + HouseReqCnt)*1.0));
     end;
  
positive.code:   UpdateWareBalance(True);
  
    // Corn delay to stop build swine or mill before farm (another way is to check if we have corn but it does not work well)
    fCornDelay := Byte(gHands[fOwner].Stats.GetWareBalance(wt_Corn) > 0);
  end;
  
  
  
negative.code: 
    // Requred houses should be saved because of public variable
    SaveStream.Write(RequiredHouses, SizeOf(TRequiredHousesArray));
    // fWareBalance must be saved because of FinalConsumption, Trading and building algorithm
    for WT := WARE_MIN to WARE_MAX do
      SaveStream.Write(fWareBalance[WT], SizeOf(TWareBalance));
    // Stats are updated each cycle and doesn't have to be saved
  