Fix for bug #2721