fix string ending bug in font insertion