Fixed a bug where the system could crash when expanding am: 3e77984434 am: c19b510454
am: 5a0845841d

Change-Id: I6337324fbe95dbe84b362cb5fc96435bf4702ca5