fix duplicates error