Fixes for concurrency