Updated validation of duplicates