Fix concurrent bug