fix race condition between updating running builds and polling completed builds.