diff --git a/nac3artiq/src/codegen.rs b/nac3artiq/src/codegen.rs
index 29982f22..9f4193a5 100644
--- a/nac3artiq/src/codegen.rs
+++ b/nac3artiq/src/codegen.rs
@@ -732,7 +732,7 @@ fn format_rpc_ret<'ctx>(
);
}
- ndarray.create_data(generator, ctx, llvm_elem_ty, num_elements);
+ unsafe { ndarray.create_data(generator, ctx) };
let ndarray_data = ndarray.data().base_ptr(ctx, generator);
let ndarray_data_i8 =
diff --git a/nac3core/src/codegen/expr.rs b/nac3core/src/codegen/expr.rs
index a5750903..fd2f1bdc 100644
--- a/nac3core/src/codegen/expr.rs
+++ b/nac3core/src/codegen/expr.rs
@@ -2560,7 +2560,7 @@ fn gen_ndarray_subscript_expr<'ctx, G: CodeGenerator>(
generator: &mut G,
ctx: &mut CodeGenContext<'ctx, '_>,
ty: Type,
- ndims: Type,
+ ndims_ty: Type,
v: NDArrayValue<'ctx>,
slice: &Expr