Added onComplete function to Emitter