Fix race condition when adding endpoint from UI.