Fix issue #662