Fix race detection