diff --git a/src/Transaction.jl b/src/Transaction.jl
index 3d4bd53d0fd241a40344fa120bf9c0a27d700a6d..32cef2bde23ad2ba465ea1ab1a864d90db715ad3 100644
--- a/src/Transaction.jl
+++ b/src/Transaction.jl
@@ -127,12 +127,14 @@ function add_retrieve_by_id(
     ids::Vector{T},
 ) where {T<:AbstractString}
 
+    len = Cint(length(ids))
     err_code = ccall(
         (:caosdb_transaction_transaction_retrieve_by_ids, CaosDB.library_name),
         Cint,
-        (Ref{_Transaction}, Ptr{Ptr{Cchar}}),
+        (Ref{_Transaction}, Ptr{Ptr{Cchar}}, Cint),
         transaction,
         ids,
+        len,
     )
 
     CaosDB.Exceptions.evaluate_return_code(err_code)