Fixes #1619
A better solution for fixing #1619
Merge pull request #1658 from joshuaspence/master

Fixes #1619