fix noduplicates problem