fix a mistake about thread