fix order of library loadings