fix ShutdownThread