Fixed problem with concurrency