Minor fix to embed code generation