fixes memoization async bug