Merge "Fix crash in mainline" am: 3a0d51f6b7
am: 6c5944f899

Change-Id: I2d40676c59d364c02154bced41e6ce818b5d4886