diff --git a/pystencils/backends/cbackend.py b/pystencils/backends/cbackend.py
index a73904172916184feafc3643ee7e2d7b1826f813..d8facba7627d9f23222b190d41f15f9d7788c9e8 100644
--- a/pystencils/backends/cbackend.py
+++ b/pystencils/backends/cbackend.py
@@ -49,8 +49,12 @@ def generate_c(ast_node: Node, signature_only: bool = False, dialect='c', custom
     if custom_backend:
         printer = custom_backend
     elif dialect == 'c':
+        try:
+            instruction_set = ast_node.instruction_set
+        except Exception:
+            instruction_set = None
         printer = CBackend(signature_only=signature_only,
-                           vector_instruction_set=ast_node.instruction_set)
+                           vector_instruction_set=instruction_set)
     elif dialect == 'cuda':
         from pystencils.backends.cuda_backend import CudaBackend
         printer = CudaBackend(signature_only=signature_only)