some fixes to google diff
(cherry picked from commit 1aa3346)