hack to ensure correct order of library loading