Minor tweaks to shutdown