Fixed bug with handling newline characters and any special characters in strings