Fixed Jacobi error check