Update channel.js

fixed close logic.  this should allow channels to get cleaned up.