modify the error of gradient