Fix for issue #649
Merge pull request #651 from daveraine/Issue649

Fix for issue #649