Fix race condition on first load.