Fixed #520, related to #452
Merge pull request #522 from marcj/issue-520

Fixed #520, related to #452