Possible fix for race condition

[ci skip]