final tweaks to maintenance mode infrastructure