Issue 169 and 298
Merge pull request #126 from njtaylor/master

Issue 169 and 298