fix blocked thread issue