diff --git a/openquake/engine/calculators/risk/base.py b/openquake/engine/calculators/risk/base.py
index <HASH>..<HASH> 100644
--- a/openquake/engine/calculators/risk/base.py
+++ b/openquake/engine/calculators/risk/base.py
@@ -157,7 +157,7 @@ class RiskCalculator(base.Calculator):
         self.oqparam.hazard_output = models.Output.objects.get(
             pk=self.oqparam.hazard_output_id) \
             if self.oqparam.hazard_output_id else None
-        dist = self.oqparam.asset_hazard_distance
+        dist = self.oqparam.maximum_distance
         grid_spacing = self.oqparam.region_grid_spacing
         if grid_spacing:
             dist = min(dist, grid_spacing * numpy.sqrt(2) / 2)
Fixed an incorrect asset_hazard_distance in the computation of best_maximum_distance