fixed concurrent bug.