Correct error/gradient.