Fix the input stream not assigned while not using cache