diff --git a/common/src/app/common/files/libraries_helpers.cljc b/common/src/app/common/files/libraries_helpers.cljc
index 5aa612a52..2aceb35fd 100644
--- a/common/src/app/common/files/libraries_helpers.cljc
+++ b/common/src/app/common/files/libraries_helpers.cljc
@@ -166,7 +166,7 @@
 
         [new-component-shape new-component-shapes  ; <- null in components-v2
          new-main-instance-shape new-main-instance-shapes]
-        (duplicate-component (:data library) component new-component-id)]
+        (duplicate-component component new-component-id (:data library))]
 
     (-> changes
         (pcb/with-page main-instance-page)