bug fixes in upgrade-moodle-server