Fix for bug #2805