Fixed concurrency issue.