Possible patch for #76
Merge pull request #81 from waalt/76

Fixes #76