Update src/EventDispatcher.js

fix bugs