Fix error bars in weighted samples