fix for upgrading