Fix for #2897.