Fix corrupted upgrade.php