This fixes #65, with test.