Fix upgrade process