fix infinite recursion issue when using prefetch