       --WHEN 0 THEN merge_status := 0;
       ELSE
         INSERT INTO catalogue_people(referenced_relation,record_id, people_type, order_by, people_ref)
-          VALUES ('staging', line.id, 'collectors', cnt, ref_record);
+          VALUES ('staging', line.id, 'collector', cnt, ref_record);
     END CASE;
   END LOOP;
   IF merge_status = 1 THEN 

  FOR p_name in select item from unnest(line.collectors) as item
  LOOP
    cnt := cnt + 1;
    IF EXISTS( SELECT id FROM catalogue_people WHERE referenced_relation ='staging' AND  record_id = line.id AND people_type = 'collectors' AND order_by= cnt)  THEN
      continue;
    END IF;
    

      WHEN 0 THEN merge_status := 0;
      ELSE
        INSERT INTO catalogue_people(referenced_relation,record_id, people_type, order_by, people_ref)
          VALUES ('staging', line.id, 'donator', cnt, ref_record);
    END CASE;
  END LOOP;
  IF merge_status = 1 THEN 
