init: fix undefined behavior in ExecuteCommand am: d67a4abc64
am: 279f3d593f

Change-Id: I56f463ed8b8af57993c180181a63e84f0a0eb49e