This fixes #1348.
Merge pull request #1349 from capooti/issue-1348

This fixes #1348.