Resolved some concurrency issues.