Fix issue #971