diff --git a/nac3core/src/codegen/expr.rs b/nac3core/src/codegen/expr.rs
index 432b358b..990ac83a 100644
--- a/nac3core/src/codegen/expr.rs
+++ b/nac3core/src/codegen/expr.rs
@@ -1128,7 +1128,7 @@ pub fn gen_comprehension<'ctx, G: CodeGenerator>(
)
.into_pointer_value();
let val = ctx.build_gep_and_load(arr_ptr, &[tmp], Some("val"));
- generator.gen_assign(ctx, target, val.into())?;
+ generator.gen_assign(ctx, target, val.into(), ctx.primitives.int32)?;
}
// Emits the content of `cont_bb`
diff --git a/nac3core/src/codegen/generator.rs b/nac3core/src/codegen/generator.rs
index bb822f19..5259d280 100644
--- a/nac3core/src/codegen/generator.rs
+++ b/nac3core/src/codegen/generator.rs
@@ -123,11 +123,12 @@ pub trait CodeGenerator {
ctx: &mut CodeGenContext<'ctx, '_>,
target: &Expr