fix ExecCommandComplete write error