diff --git a/.gitignore b/.gitignore
index 5743dee0e52a1de49e0394fa5efdb5bc84e1c7ca..0a96fab599a8305f2ffc4e446f3ea7fcaccd10e2 100644
--- a/.gitignore
+++ b/.gitignore
@@ -19,3 +19,4 @@ oldsrc
 CVS
 *-srv
 src/ChangeLog
+/.pytest_cache/
diff --git a/docs/attr-explanations.txt b/docs/attr-explanations.txt
new file mode 100644
index 0000000000000000000000000000000000000000..9f0826b6cab7d5a6380376120b060ac0bad5f321
--- /dev/null
+++ b/docs/attr-explanations.txt
@@ -0,0 +1,10 @@
+LambdaFel : lambda_seed / harm_num - puramente aritmentico: e' la lunghezz d'onda richiesta
+
+LambdaNominal : lunghezz d' onda calcolata dai parametri attuali letti dall ' undulatore e dall' energia nominale degli elettroni.
+
+Lmabda_empirical (lambda_fel_bar_bar) = calcolata applicando i fattori di correzione empirici DeltaE e DeltaGap: 
+1) con DeltaE si calcolano  i nuovi gap_1 e phase_1 , richiesti, modificano l' energia degli elettroni
+2) ai nuovi gap_1 e phase_1 si applica DeltaGap, gap_2=gap_1+DeltaPhase, con gap_2  si calcola il valore di phase_2 per matenere la polarizzaione richiesta.
+3) con gap_2 e phase_2 e la nuova energia  degli elettroni, si  calcola la lungh. d' onda.
+
+:
diff --git a/src/SuperGap.py b/src/SuperGap.py
index 610b1232c236cf7d9650283de073233090598c9c..ea66951e1ded7a45ba3f2b095c0ca1809d36d4be 100644
--- a/src/SuperGap.py
+++ b/src/SuperGap.py
@@ -672,6 +672,7 @@ class SuperGap (PyTango.LatestDeviceImpl):
         self.debug_stream("In read_attr_hardware()")
         #----- PROTECTED REGION ID(SuperGap.read_attr_hardware) ENABLED START -----#
         self.check_and_update()
+        self.update_internal_values() # update values - in case ID has been manipulated by other clients
         #----- PROTECTED REGION END -----#	//	SuperGap.read_attr_hardware
 
 
@@ -687,6 +688,12 @@ class SuperGap (PyTango.LatestDeviceImpl):
         if not self.calculated_values_in_range:
             #self.error_stream('ApplyGapPhaTap: values out of range')
             tango.Except.throw_exception('out of range values', 'gap or phase out of range', 'ApplyGapPhaTap')
+        
+        # get actual Offest which cna be set externally and must be preserved
+        try:
+            self.offset_setpoint = self.idev.read_attribute('Offset').w_value
+        except tango.DevFailed:
+            self.offset_setpoint= float('0.0') # probably also the write will fail, this is just  a best effort
         # taper is ALWAYS forced to 0.0
         try:
             if self.Detuned: