Fix the behavior of Graph.Register so that it can be interrupted without side effect