fix funky async race conditions