fix find duplicate element