fix another thread bug