fix issue that allowed duplicate words