Fixed substring for libs, now i think im so stupid