diff --git a/pystencils/cache.py b/pystencils/cache.py
index e62f982d3f9f95aeaafa1f9d1ee872a8f0d3191c..34db1d6583b3eeeabd583c9af6f59225a59ee742 100644
--- a/pystencils/cache.py
+++ b/pystencils/cache.py
@@ -1,8 +1,10 @@
 import os
 from collections.abc import Hashable
-from functools import partial, wraps, lru_cache
+from functools import partial, wraps
 from itertools import chain
 
+from functools import lru_cache as memorycache
+
 from joblib import Memory
 from appdirs import user_cache_dir
 
@@ -23,7 +25,7 @@ def _wrapper(wrapped_func, cached_func, *args, **kwargs):
 
 def memorycache_if_hashable(maxsize=128, typed=False):
     def wrapper(func):
-        return partial(_wrapper, func, lru_cache(maxsize, typed)(func))
+        return partial(_wrapper, func, memorycache(maxsize, typed)(func))
 
     return wrapper
 
diff --git a/pystencils/typing/leaf_typing.py b/pystencils/typing/leaf_typing.py
index b8cefb450adb5f3ead35618c5dcb28447b5854f9..b5af7e4b21ae348925f4d81cc5db196cc179bf95 100644
--- a/pystencils/typing/leaf_typing.py
+++ b/pystencils/typing/leaf_typing.py
@@ -190,7 +190,8 @@ class TypeAdder:
         #    # TODO can we ignore this and move it to general expr handling, i.e. removing Mul? (See todo in backend)
         #    # args_types = [self.figure_out_type(arg) for arg in expr.args if arg not in (-1, 1)]
         elif isinstance(expr, sp.Indexed):
-            raise NotImplementedError('sp.Indexed')
+            typed_symbol = expr.base.label
+            return expr, typed_symbol.dtype
         elif isinstance(expr, ExprCondPair):
             expr_expr, expr_type = self.figure_out_type(expr.expr)
             condition, condition_type = self.figure_out_type(expr.cond)