Fixed an issue where invalids words were being detected twice