made diffing more robust