Simplified the total error calculation in scale_histogram_errors