Fix issue #870