Fixing more concurrency issues.