diff --git a/CHANGES.md b/CHANGES.md
--- a/CHANGES.md
+++ b/CHANGES.md
@@ -1,3 +1,7 @@
+## 0.4.0.1 (2014-07-12)
+
+ * Fix JS bug which led to type errors for distribution metrics.
+
 ## 0.4.0.0 (2014-05-01)
 
  * Lots of the internals were split off into a new package, ekg-core.
diff --git a/assets/monitor.js b/assets/monitor.js
--- a/assets/monitor.js
+++ b/assets/monitor.js
@@ -293,8 +293,13 @@
             }
             if (!paused) {
                 if (value.type === DISTRIBUTION) {
-                    var val = value.mean.toPrecision(8) + '\n+/-' +
-                        Math.sqrt(value.variance).toPrecision(8) + ' sd';
+                    if (value.mean !== null) {
+                        var val = value.mean.toPrecision(8) + '\n+/-' +
+                            Math.sqrt(value.variance).toPrecision(8) + ' sd';
+                    }
+                    else {
+                        var val = "N/A";
+                    }
                 } else {  // COUNTER, GAUGE, LABEL
                     var val = value.val;
                 }
diff --git a/ekg.cabal b/ekg.cabal
--- a/ekg.cabal
+++ b/ekg.cabal
@@ -1,5 +1,5 @@
 name:                ekg
-version:             0.4.0.0
+version:             0.4.0.1
 synopsis:            Remote monitoring of processes
 description:
   This library lets you remotely monitor a running process over HTTP.
