* fix race condition
Use safe map to fix data race