race-condition-fix