Fix upgrade migration