added correct handling of (K + sigma^2I) behavior in the CG algorithm