Merge "More correct startup and shutdown procedures."
am: 618d4215a2

Change-Id: I4844130b04ded0fc913593081d07a6052bdc0e42