Good catch. I'll try changing to addEventListener() and removeEventListener().