fix a concurrent bug