Fixed variable/function confusion in comm with shutdown.