handle race condition in URL expansion