unit test coverage for event-emitter, fixes