fix the integral diff feature