fix ch global leak

Maybe you should use jshint or smtg to detect globals easily.
Merge patch request 733 from vvo/patch-1

fix ch global leak