Fixed bugs with bisection method, added flag to turn it off.