Fixed some errors in emitter