revert upgrade.php to working version