Improved logic when first loading library data