Just copy your `unregister` call to the other function.