fix on the destroy function of the channel js class