Fix issue #629