Merge cherrypicks of [4681974, 4681592] into pi-release-2

Change-Id: I4bcb337b9a5e2f8a1ee9be0fa7b625134a4b1a75