Solved bug at autodiff