diff --git a/isochrones/isochrone.py b/isochrones/isochrone.py
index <HASH>..<HASH> 100644
--- a/isochrones/isochrone.py
+++ b/isochrones/isochrone.py
@@ -166,8 +166,8 @@ class Isochrone(object):
             bands = self.bands
         mags = {band:self.mag[band](*args) for band in bands}
         if distance is not None:
+            dm = 5*np.log10(distance) - 5
             for band in mags:
-                dm = 5*np.log10(distance) - 5
                 A = AV*EXTINCTION[band]
                 mags[band] = mags[band] + dm + A
Small fix.

It's better to put *dm* out the for-loop to save calculations.