Fix for issue #322