Fix Duplication and DuplicationKey mode