Minor fixes for Moodle 2.5 compatibility