Fix for #6681