diff --git a/src/cal_tools/agipdlib.py b/src/cal_tools/agipdlib.py
index 2e82ca223e30b4b836dec6f93a7a3ed3c5e35f4a..55c99d1f7f0e1caae8eaee6848cb3a1282bb2a8b 100644
--- a/src/cal_tools/agipdlib.py
+++ b/src/cal_tools/agipdlib.py
@@ -210,7 +210,7 @@ class AgipdCtrl:
             # As HED_DET_AGIPD500K2G has a hardware issue that leads
             # to storing arbitrary voltage values in the CONTROL source
             # array. e.g. /gpfs/exfel/exp/HED/202230/p900248/raw
-            return self.run_dc.get_run_value(*voltage_src)
+            return int(self.run_dc.get_run_value(*voltage_src))
         else:
             # TODO: Validate if removing this and
             # and using NB value for old RAW data.