Implement changes suggested in #327
Merge pull request #330 from adamrp/issue-327

Implement changes suggested in #327