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

Change-Id: Icf8c8743f57a5e402275adfc645f08a10cf94a3b