guard against closing channels