fixed bug in searchLibrary