Fix issue #322