fix issue #945