fixes #27

Small fix and test for issue #27.