Trying fix for compatability with Moodle 2.4