fixes on diff-calc