Added ordering: first upgrade then install