Fix the bugs of ignoring duplicate elements,AC