bugfix: need to initialize package manager earlier