Fix bug in concurrency