Incoporate changes from pull request 12