fixed a small error in reduce_Jacobian