Fix thread leak when AUTORUN passed invalid name