Fix race condition in synchronous requests.