fix for bug #1861