fixed problem with gsub for apostrophes