fix inconsist tu may caused by thread