Fix race condition in progress callbacks.