Changes from pull request #480