fix small bug for error bar plots