diff --git a/LCS/PyCommon/math.py b/LCS/PyCommon/math.py
index b461a4202bbd588b5184647ce0cb7210317444ec..3dd0b351b9ab6a84ed89cf3581be91aa4b0740e2 100644
--- a/LCS/PyCommon/math.py
+++ b/LCS/PyCommon/math.py
@@ -1,7 +1,10 @@
-from fractions import gcd
+try:
+    from math import gcd
+except ImportError:
+    from fractions import gcd
 
 __all__ = ["lcm"]
 
 def lcm(a, b):
     """ Return the Least Common Multiple of a and b. """
-    return abs(a * b) / gcd(a, b) if a and b else 0
+    return int(abs(a * b) / gcd(a, b) if a and b else 0)
diff --git a/SAS/ResourceAssignment/TaskPrescheduler/lib/cobaltblocksize.py b/SAS/ResourceAssignment/TaskPrescheduler/lib/cobaltblocksize.py
index ac14727d9a2c2645de608bf7454bd9bf60e30175..52c3ae1853232578adeb76089b96260d020ba94b 100644
--- a/SAS/ResourceAssignment/TaskPrescheduler/lib/cobaltblocksize.py
+++ b/SAS/ResourceAssignment/TaskPrescheduler/lib/cobaltblocksize.py
@@ -96,7 +96,7 @@ class BlockConstraints(object):
         NR_PPF_TAPS = 16
         MAX_THREADS_PER_BLOCK = 1024
         CORRELATOR_BLOCKSIZE = 16
-        BEAMFORMER_NR_DELAYCOMPENSATION_CHANNELS = 64
+        BEAMFORMER_NR_DELAYCOMPENSATION_CHANNELS = 256
         BEAMFORMER_DELAYCOMPENSATION_BLOCKSIZE = 16
 
         # Process correlator settings
diff --git a/SAS/ResourceAssignment/TaskPrescheduler/test/t_cobaltblocksize.py b/SAS/ResourceAssignment/TaskPrescheduler/test/t_cobaltblocksize.py
index 8eaec011e3fd642723377b9ace171db8a687dfd1..dee024550e87002b001d5488e4d657bc246120d1 100644
--- a/SAS/ResourceAssignment/TaskPrescheduler/test/t_cobaltblocksize.py
+++ b/SAS/ResourceAssignment/TaskPrescheduler/test/t_cobaltblocksize.py
@@ -99,5 +99,20 @@ class TestBlockSize(unittest.TestCase):
 
             self.assertAlmostEquals(c._samples2time(bs.integrationSamples), integrationTime, delta = integrationTime * 0.05)
 
+    @unit_test
+    def testCoherentStokesBlocksize(self):
+        """ Test the coherent stokes block size against reference output, based on cases that used to fail in production.
+            If the output of these calculations change, make sure the described configurations do actually work in COBALT! """
+
+        coh = StokesSettings()
+        coh.nrChannelsPerSubband = 16
+        coh.timeIntegrationFactor = 1
+
+        c = BlockConstraints(coherentStokesSettings=[coh])
+        bs = BlockSize(c)
+
+        self.assertEqual(bs.blockSize, 196608)
+
+
 if __name__ == "__main__":
     unittest.main(verbosity=2)