Fix to close channels in any case