identified bug causing extra characters

Extra characters are causing the string length to be calculated wrongly, going into the wrong nodes.