Fix bugs with punctuation and line breaks