Fixed minor bugs causing root finder to throw.