fixup 'int' vs. 'thread_id_t' usage