Fix for issue #6799