Bug fix for Cholesky factorization