Change playerid to thread_idx