adding code so the emitter will work correctly with external nodes