remove duplicates created from copy