fixed issue #322