Fix refactor of resource prefetch