Corrected a numerical instability in constraint equations