Fix issue #89, with test