diff --git a/nac3artiq/src/codegen.rs b/nac3artiq/src/codegen.rs
index 0db15014..be68e104 100644
--- a/nac3artiq/src/codegen.rs
+++ b/nac3artiq/src/codegen.rs
@@ -722,7 +722,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 402cfbe5..158dfe96 100644
--- a/nac3core/src/codegen/expr.rs
+++ b/nac3core/src/codegen/expr.rs
@@ -2521,7 +2521,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