Minor fixes on Mery's pull request