events.js: emit fails with one listener -> fixed