Shutdown improvements