Changed the conditions from the incorrect upgradePLS3