Data race fix