diff --git a/src/sfg_walberla/boundaries/hbb.py b/src/sfg_walberla/boundaries/hbb.py
index 08d127a2835f467e751d6c9fbc7357e4e884315e..fdc1683ccbfe3c1b010e5d47de0fd5ec16dfe8b4 100644
--- a/src/sfg_walberla/boundaries/hbb.py
+++ b/src/sfg_walberla/boundaries/hbb.py
@@ -1,6 +1,6 @@
 """Code generation for half-way bounce-back LBM boundary conditions in waLBerla"""
 
-from pystencils import Field, FieldType, TypedSymbol, Target, AssignmentCollection
+from pystencils import Field, FieldType, TypedSymbol, Target, AssignmentCollection, DynamicType
 
 from pystencils.types import PsStructType, create_type
 
diff --git a/src/sfg_walberla/sweep.py b/src/sfg_walberla/sweep.py
index 19fcc8d6b5f6f0374963b2c0d83d3b06276ed405..5c16a448fef6d95daf36fa4d5097756365a348b0 100644
--- a/src/sfg_walberla/sweep.py
+++ b/src/sfg_walberla/sweep.py
@@ -458,7 +458,7 @@ class Sweep(CustomGenerator):
     @sparse.setter
     def sparse(self, sparse_iteration: bool):
         if sparse_iteration:
-            if self._gen_config.index_dtype != create_type("int64"):
+            if self._gen_config.get_option("index_dtype") != create_type("int64"):
                 raise ValueError(
                     "Sparse sweeps require `int64_t` as their index data type. Check your code generator config."
                 )
diff --git a/src/sfg_walberla/symbolic.py b/src/sfg_walberla/symbolic.py
index 2d0eaee52c9617ab1d0d11d144d72f5100c95a07..9e85ddd28a8ee180bed74c8a4ceb9dc3b43ee651 100644
--- a/src/sfg_walberla/symbolic.py
+++ b/src/sfg_walberla/symbolic.py
@@ -2,9 +2,8 @@ import sympy as sp
 
 import inspect
 
-from pystencils import TypedSymbol, DynamicType
+from pystencils import TypedSymbol, DynamicType, tcast
 from pystencils.defaults import DEFAULTS
-from pystencils.sympyextensions import CastFunc
 
 
 def expandable(name: str):
@@ -83,7 +82,7 @@ class CellCoordinates:
     def x():
         return BlockCoordinates.aabb_min[0] + CellCoordinates.cell_extents[
             0
-        ] * CastFunc.as_numeric(
+        ] * tcast.as_numeric(
             block.ci_min[0] + sp.Symbol(DEFAULTS.spatial_counter_names[0])
         )
 
@@ -91,7 +90,7 @@ class CellCoordinates:
     def y():
         return BlockCoordinates.aabb_min[1] + CellCoordinates.cell_extents[
             1
-        ] * CastFunc.as_numeric(
+        ] * tcast.as_numeric(
             block.ci_min[1] + sp.Symbol(DEFAULTS.spatial_counter_names[1])
         )
 
@@ -99,25 +98,25 @@ class CellCoordinates:
     def z():
         return BlockCoordinates.aabb_min[2] + CellCoordinates.cell_extents[
             2
-        ] * CastFunc.as_numeric(
+        ] * tcast.as_numeric(
             block.ci_min[2] + sp.Symbol(DEFAULTS.spatial_counter_names[2])
         )
 
     @expandable("cell.local_x")
     def local_x():
-        return CellCoordinates.cell_extents[0] * CastFunc.as_numeric(
+        return CellCoordinates.cell_extents[0] * tcast.as_numeric(
             block.ci_min[0] + DEFAULTS.spatial_counters[0]
         )
 
     @expandable("cell.local_y")
     def local_y():
-        return CellCoordinates.cell_extents[1] * CastFunc.as_numeric(
+        return CellCoordinates.cell_extents[1] * tcast.as_numeric(
             block.ci_min[1] + DEFAULTS.spatial_counters[1]
         )
 
     @expandable("cell.local_z")
     def local_z():
-        return CellCoordinates.cell_extents[2] * CastFunc.as_numeric(
+        return CellCoordinates.cell_extents[2] * tcast.as_numeric(
             block.ci_min[2] + DEFAULTS.spatial_counters[2]
         )