Fix suggested by Juan Leyva

https://moodle.org/mod/forum/discuss.php?d=260865#p1134721
The error persist