Fixes more issues that were preventing proper shutdowns, restarts, and upgrades.