fixed random fails of unit tests for duplicates check