fix package manager logic