small fix for race condition