fix the anonymous func index bug in emitter