fixing some of the moodle problems