Fixed abrupt and untimely end of update.php