Bug fix #850

Bug fix #850