This fixes #1360.
Merge pull request #1365 from capooti/issue-1360

This fixes #1360.