fix a few bugs regarding new different case words and removing duplicates