fix order of libraries