More concurrency bug fixes