fix bug in thread poo;