fixed some small but important typos; now instead of -3 (Linear solve failed) it's line search failed