minor changes to upgrade, add in cf invalidate