Fixed the gradient