Correct fix for Promise.race