Fix issue #631