fixed a stack overflow in string parsing