Fix a (theoretical) race leading to a crash