bug fix when error bar is zero

- fixed a bug that an exception is thrown when error bar is zero.
  - due to a numerical error, sqrt of a negative value is sometimes calculated.