fixed one bug for writing text vector.