fix bug duplicates