fixed thread_CloseHandle