Fix timing issue in NetworkContext#sync