fix concurrency issue