Fix LBFGS stopping conditions.