Bug fix #322