Fixes an issue with channels not being unregistered.