Bugfix for FS#1318
Merge pull request #150 from tom-r/master

Bugfix for FS#1318