fixed for new Moodle version