Fixed bug in initial guess
Fixed bug on linesearch