Fix bug with package installation order