fix restarts on upgrades