port changeset 0d7fdf0205eef2f0bc5f40265dffcbf4af396535 from master