Fixes #211 and adds one test for it.
Merge pull request #213 from pyfisch/issue211

Fixes #211 and adds one test for it.