Fix sentence end punctuation bug