Close channels when shutting down