slightly kludgey workaround to shutdown panics caused by closed channels.