fix a remote callback race condition