diff --git a/BUGS b/BUGS
index 1fbbc38d908f21d6a2dba1522d271500f62a85ea..eb35bce403f932e1bcc2b8ff11be1cf1580b73ac 100644
--- a/BUGS
+++ b/BUGS
@@ -48,4 +48,33 @@ must be the same.
 
 Error in ==> tsgqc>Cal_OffMenuCallback at 1603
     tsg.CNDC_LINCOEF(1) = str2num(get( hetCalCNDCSlope,  'String'));
+	
+9/01/2009
+---------
+The name of the directory cannot be identical to the name of the program.
+It cannot be named 'tsgqc'. Otherwise there is a problem to get the
+directory of the program. See the following lines :
+
+fulltsgqcname = mfilename('fullpath');
+DEFAULT_PATH_FILE = strrep(fulltsgqcname, tsgqcname, '') ;
+
+9/01/2009
+---------
+La touche CANCEL the calibration rend les variables _CAL
+EMPTY.
+
+En fait si à l'ouverture du fichier une vzariable CAL existe,
+que l'on veuille plusieurs tests et revenir à la variable _CAL
+intiale ce n'est pas possible. La réinitialisation est sévère !
+
+IL faut 2 boutons :
+1 - BACK -One step backward
+2 - CANCEL - Empties the varaibalbe _CAL
+
+9/01/2009
+---------
+The correction is applied on SSPS, SSJT, SSTP data but not
+on _CAL data
+
+
 
diff --git a/tsg_util/corTsgLinear.m b/tsg_util/corTsgLinear.m
index 1ac59740956631d72f1ff60ae3e2fae26f0ae320..1b13c90782fe05962274a3c5d5eb002e71ca6b16 100644
--- a/tsg_util/corTsgLinear.m
+++ b/tsg_util/corTsgLinear.m
@@ -57,17 +57,13 @@ PROBABLY_GOOD = get(tsg.qc.hash, 'PROBABLY_GOOD', 'code');
 PROBABLY_BAD  = get(tsg.qc.hash, 'PROBABLY_BAD',  'code');
 VALUE_CHANGED = get(tsg.qc.hash, 'VALUE_CHANGED', 'code');
 
-% intialisation
-% -------------
+% Intialisation
+% 01/09/2009 : intialisation to NaN
+% ---------------------------------
 if isempty( tsg.([PARA '_ADJUSTED']) )  
-  tsg.([PARA '_ADJUSTED'])       = tsg.(PARA);
-  tsg.([PARA '_ADJUSTED_QC'])    = tsg.([PARA '_QC']);
-end
-
-% If only calibration have been applied ERROR is empty
-% ---------------------------------------------------
-if isempty( tsg.([PARA '_ADJUSTED_ERROR']) )  
-  tsg.([PARA '_ADJUSTED_ERROR']) = NaN* ones(size(tsg.(PARA))); 
+  tsg.([PARA '_ADJUSTED'])       = NaN*ones(size(tsg.(PARA)));
+  tsg.([PARA '_ADJUSTED_QC'])    = NaN*ones(size(tsg.([PARA '_QC'])));
+  tsg.([PARA '_ADJUSTED_ERROR']) = NaN*ones(size(tsg.(PARA))); 
 end
 
 if dateMax > dateMin
@@ -96,8 +92,8 @@ if dateMax > dateMin
         [p, S, mu] = polyfit( X, Y, 1);
 
         % The correction is applied to the TSG between dateMin and dateMax using
-        % a linear interpolation only on measurements better than
-        % PROBABLY_BAD QC
+        % a linear interpolation only on measurements with keptCode Quality
+        % Codes
         % ----------------------------------------------------------------------
         for icode = 1 : length( keptCode )
           dtTsg = find( tsg.DAYD    >= dateMin  & tsg.DAYD <= dateMax &...
@@ -109,6 +105,7 @@ if dateMax > dateMin
                                     polyval( p, tsg.DAYD(dtTsg), S, mu);
             tsg.([PARA '_ADJUSTED'])(dtTsg) = ...
                             tsg.(PARA)(dtTsg) + tsg.([PARA '_ADJUSTED'])(dtTsg);
+            tsg.([PARA '_ADJUSTED_QC'])(dtTsg) = tsg.([PARA '_QC'])(dtTsg);
 
             % The error is maximum, equal to 1, if the median is computed with
             % less than 4 samples
diff --git a/tsg_util/corTsgMedian.m b/tsg_util/corTsgMedian.m
index f0f465a2ae805620f08873f1ee17ceb1ef9badb7..d9e3dd55e0b8f358ddeecebcd5302a3812bf40c8 100644
--- a/tsg_util/corTsgMedian.m
+++ b/tsg_util/corTsgMedian.m
@@ -66,13 +66,9 @@ VALUE_CHANGED = get(tsg.qc.hash, 'VALUE_CHANGED', 'code');
 % intialisation
 % -------------
 if isempty( tsg.([PARA '_ADJUSTED']) )  
-  tsg.([PARA '_ADJUSTED'])       = tsg.(PARA);
-  tsg.([PARA '_ADJUSTED_QC'])    = tsg.([PARA '_QC']);
-end
-% If only calibration have been applied ERROR is empty
-% ---------------------------------------------------
-if isempty( tsg.([PARA '_ADJUSTED_ERROR']) )  
-  tsg.([PARA '_ADJUSTED_ERROR']) = NaN* ones(size(tsg.(PARA))); 
+  tsg.([PARA '_ADJUSTED'])       = NaN*ones(size(tsg.(PARA)));
+  tsg.([PARA '_ADJUSTED_QC'])    = NaN*ones(size(tsg.([PARA '_QC'])));
+  tsg.([PARA '_ADJUSTED_ERROR']) = NaN*ones(size(tsg.(PARA))); 
 end
 
 % Create a structure with an NaN
@@ -198,6 +194,7 @@ if dateMax > dateMin
                                   interp1(cor.DAYD, cor.DIFF, tsg.DAYD(dtTsg));
       tsg.([PARA '_ADJUSTED_ERROR'])(dtTsg) = ...
                                   interp1(cor.DAYD, cor.ERROR, tsg.DAYD(dtTsg));
+      tsg.([PARA '_ADJUSTED_QC'])(dtTsg) = tsg.([PARA '_QC'])(dtTsg);
     end
         
   end
diff --git a/tsg_util/diffTsgSample.m b/tsg_util/diffTsgSample.m
index b8fd96ee987cfd5871b65d0c0be0eb40a09ca11a..b42ec7a28ea4d1a3de6b33fb8be44f10ee635b8c 100644
--- a/tsg_util/diffTsgSample.m
+++ b/tsg_util/diffTsgSample.m
@@ -13,6 +13,7 @@ tsg    = getappdata( hMainFig, 'tsg_data');
 probablyGoodCode = get(tsg.qc.hash, 'PROBABLY_GOOD', 'code');
 missingValueCode = get(tsg.qc.hash, 'MISSING_VALUE', 'code');
 
+% For temperature : 
 % IF PARA = 'SSJT' use 'SSTP' to get the samples
 % ----------------------------------------------
 SAMPLE = PARA;
diff --git a/tsgqc.m b/tsgqc.m
index f1374143ef3a12804353eb87063c8b7db74cba77..2c4a388ee052e70506ff8725cc9a73470c5e8365 100644
--- a/tsgqc.m
+++ b/tsgqc.m
@@ -1547,8 +1547,7 @@ end
     set( hTimelimitToggletool, 'state', 'off', 'enable', 'off' );
     set( hZoomInToggletool,    'state', 'off', 'enable', 'on' );
     set( hZoomOutToggletool,   'state', 'off', 'enable', 'on' );
-
-        
+       
     % Get tsg application data
     % ------------------------
     tsg = getappdata( hMainFig, 'tsg_data' );
@@ -1647,7 +1646,7 @@ end
     
     % Update the Adjusted variables (SSPS - SSJT) with calibrated records
     % -------------------------------------------------------------------
-    updateAdjustedVariable( hMainFig );
+    % updateAdjustedVariable( hMainFig );
     
     % Refresh plot #1
     % ---------------
@@ -1682,7 +1681,7 @@ end
     
     % Update the Adjusted variables 
     % -----------------------------
-    updateAdjustedVariable( hMainFig );
+    % updateAdjustedVariable( hMainFig );
     
     % Refresh plot #1
     % ---------------
@@ -2494,9 +2493,11 @@ end
     % --------------------------------------------------
     PARA = tsg.preference.parameter{1};
 
-    % To cancel the correction set the ERROR to [] then
-    % call updateAdjustedVariable.
+    % To cancel the correction set the ADJUSTED variable
+    % to [] 
     % --------------------------------------------------
+    tsg.([PARA '_ADJUSTED']) = [];
+    tsg.([PARA '_ADJUSTED_QC']) = [];
     tsg.([PARA '_ADJUSTED_ERROR']) = [];
 
     % Save tsg data
@@ -2506,7 +2507,7 @@ end
     % Set the ADJUSTED variable either to the raw variable or to
     % the calibrated variable
     % ----------------------------------------------------------
-    updateAdjustedVariable( hMainFig );
+    % updateAdjustedVariable( hMainFig );
 
     % Plot in the 3 axes
     % ------------------