Fixed bug in concurrency handling.