Integrates changes from pull request #1