solve concurrency issue