This should be done with an `@onExit` higher up.