diff --git a/openquake/engine/calculators/hazard/general.py b/openquake/engine/calculators/hazard/general.py
index <HASH>..<HASH> 100644
--- a/openquake/engine/calculators/hazard/general.py
+++ b/openquake/engine/calculators/hazard/general.py
@@ -495,10 +495,12 @@ class BaseHazardCalculator(base.Calculator):
                 yield task_args
                 n += 1
 
+        if self.__class__.__name__ == 'DisaggHazardCalculator':  # kludge
+            return  # the tasks management is different in the calculator
+            # this should be managed in a saner way
+
         # sanity check to protect against future changes of the distribution
         num_tasks = models.JobStats.objects.get(oq_job=self.job.id).num_tasks
-        if num_tasks != n:
-            import pdb; pdb.set_trace()
         assert num_tasks == n, 'Expected %d tasks, got %d' % (num_tasks, n)
 
     def _get_realizations(self):
Added a sanity check to make sure that the stored num_tasks is correct