Fix #25 bug that caused subscript out of bounds error
when calculating confidence intervals