fix issue #824