fix computation of dual residual on final condition