fixed issue #809