cleanup and also handle prefetch