Fixesd bugs with dupes