sortLibraryies bug fix