Concurrency bugfixes