check duplicates
fix duplicates