patch from issue 770383002 at patchset 160001 (http://crrev.com/770383002#ps160001)