fix bug in auto fit, error was zero so bias always > error