Fixes issue #1002
Merge pull request #1003 from gregmoser/issue-1002

Issue 1002