we need this for error bars
fix a bug