Cherry-pick fixes

Change-Id: I6464e86d4c4205e427ab0dbd918d8b3c86148fab