added rescue for empty libraries