Fixed infinite loop on unterminated strings