concurrency bug fixes