diff --git a/uhepp-js/src/components/Graph.jsx b/uhepp-js/src/components/Graph.jsx
index 386fd4f1cecd6d222b1c8785de9881620ac13e9a..3ff7bf3b943a8bae29e707afb881e6f845c1e601 100644
--- a/uhepp-js/src/components/Graph.jsx
+++ b/uhepp-js/src/components/Graph.jsx
@@ -363,15 +363,15 @@ const Histogram = ({
         }
       })
 
-			if (stack.type == "stepfilled") {
-        for (let bin_i=1; bin_i < n_bins; bin_i++) {
+			if (stack.type == "stepfilled" || stack.type == "step") {
+        for (let bin_i=0; bin_i < n_bins; bin_i++) {
           const whole_stack = stack.content.map(si => si["yield"]).flat()
-          const stat = sumStat(uhepp.yields, whole_stack, bin_i)
+          const stat = sumStat(uhepp.yields, whole_stack, bin_i + 1)
           objects.push(<rect
             key={`rect-${stack_index}-uncert-${bin_i}`}
-            x={xScale(edges[bin_i - 1])}
-            width={xScale(edges[bin_i]) - xScale(edges[bin_i - 1])}
-            y={yScale(bottom + stat)}
+            x={xScale(edges[bin_i])}
+            width={xScale(edges[bin_i + 1]) - xScale(edges[bin_i])}
+            y={yScale(bottom[bin_i] + stat)}
             fill="url(#errorBand)"
             height={yScale(bottom[bin_i] - stat) - yScale(bottom[bin_i] + stat)}
             onMouseOver={() => onMouseOverBin(bin_i)}