Fix condition for installing new packages