Fix shutdown/reboot bug

Change-Id: I8581094fe9c4be201b9350021c03adeddc4dbf1e