Fixed bug in pull request #227