fix for data race
fmt (sorry)
Merge pull request #280 from nikhan/api_data_race

api data race