Fix bug in pull request #9