a bug while calling prefetch_segments