Further fixes memoization errors