Fix check_pool thr_id, clean up.