Corrcet smartptr ref management when used with ExecCmd.