Corrected for BFGS Bug.