fix annoying race condition on startup