Additional fixes to Diff calculation