some enhancements / fixes in update.php