Update residuals