Bug fix #321