Fix build process, add option to prefetch subjects