Apply pull request #182.