fix bug when read-name-value-pair.