Improved handling of terms with apostrophes #170