fix some races