DB concurrency fixes