Fix issue #651
Merge pull request #654 from sklam/issue651

Fix issue #651