fixed concurrency issue