Fixes search path and library issues