EventTarget polyfill bug fix