Fix for #254
Merge pull request #348 from nikmolnar/master

Fix for #254