Fix a bug on inverse diff