fix issue #818