fix bug in yaml emitter