fix a race based on rwbarton's error message