Fixing duplicated entries