Fix for bug #2399