First pass at #412
Merge pull request #825 from NickMk/master

First pass at #412