fixed issue #990