Fix for bug #2313