fix bugs in prefetching,