fixes #6858