Fix memory problem with y, add LBFGS errors