do you think this should be indented into the `if` block so it only runs in a restart context?