Fix duplicate check.