Fix #144, thanks Mike Bruns (https://moodle.org/user/view.php?id=1742478)