added test for github issue #51 et al