Fixed concurrency issues