Fix huge concurrency bug/vulnerability