fix residual