First pass at #1007
Merge pull request #1015 from jonocodes/patch-1

First pass at #1007