Fix for bug #2825