Correction of the gradient sign