Fixed tests for duplicates