anchor.diff:       procedure AfterOpen(Sender:TObject);
        procedure BeforeClose(Sender:TObject);
        procedure AfterClose(Sender:TObject);
  +
  +     procedure NouzReleaseLoko();
   
        procedure ConnectChange(Sender: TObject; addr:Integer; code:TConnect_code;
           data:Pointer);                                                          // event volany z .Trace pri zmene majitele lokomotivy (loko prevzato, ukradeno, nedostupne, ...)
  
positive.code:  F_Main.LogStatus('Centrla: odpojovn...');
   F_Main.S_Intellibox_connect.Brush.Color := clBlue;
   Application.ProcessMessages();
  
   if (not Self.force_close) then
    begin
     GetMem(data, sizeof(integer));
     for i := 0 to _MAX_ADDR-1 do
      begin
       if (HVDb.HVozidla[i] = nil) then continue;
  
       HVDb.HVozidla[i].Slot.stolen := false;
       if (HVDb.HVozidla[i].Slot.prevzato) then
        begin
         Integer(data^) := i;
         Self.callback_err := TTrakce.GenerateCallback(Self.NouzReleaseCallbackErr, data);
         Self.OdhlasitLoko(HVDb.HVozidla[i]);
        end;
       while (HVDb.HVozidla[i].Slot.prevzato) do
        begin
         sleep(1);
         Application.ProcessMessages;
        end;
      end;
     FreeMem(data);
    end;//if not Self.force_close
  
   Self.Trakce.BeforeClose();   // smaze buffer historie
  end;//procedure
  
  
negative.code:    Exit(0);
    end;
  
   for i := 0 to _MAX_ADDR-1 do
     if (HVDb.HVozidla[i] <> nil) then
       HVDb.HVozidla[i].Slot.stolen := false;
  
   if (not force) then Self.NouzReleaseLoko();
   
   try
    Self.Trakce.ComPort.CPort.Close();
   except
  