fixes, now working correctly with libs