fix problem with bisection root-finding (issue 233)