Fix errors introduced by fribeiro1's pull request