Fixed crashing when unregistering channel