Fix memoization with stream mode .