Fix for bug #2681