Merge cherrypicks of [3739591, 3740135] into pi-release

Change-Id: I4caa7a73294f558286fc66a86f26954f4ebcac8a