fix thread id issue in linux