add unittest for #24
fix #24
Merge pull request #25 from paulstaab/fix_issue_24

Fix issue 24